Faster C software with Dynamic Feature Detection
todsacerdoti
61 points
3 comments
March 04, 2026
Related Discussions
Found 5 related stories in 49.9ms across 3,471 title embeddings via pgvector HNSW
- Faster asin() was hiding in plain sight def-pri-pub · 185 pts · March 11, 2026 · 50% similar
- Show HN: GDSL – 800 line kernel: Lisp subset in 500, C subset in 1300 FirTheMouse · 62 pts · March 15, 2026 · 48% similar
- Even faster asin() was staring right at me def-pri-pub · 107 pts · March 16, 2026 · 47% similar
- If DSPy is so great, why isn't anyone using it? sbpayne · 209 pts · March 23, 2026 · 46% similar
- Speed at the cost of quality: Study of use of Cursor AI in open source projects (2025) wek · 102 pts · March 16, 2026 · 44% similar
Discussion Highlights (3 comments)
pjmlp
While using C extensions, and yes Microslop rather have you using C++. https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an... Even if in recent years after tbat post they added support for C11 and C17, minus some stuff like aligned mallocs.
BearOso
For function-multiversioning, the intrinsic headers in both gcc and clang have logic to take care of selecting targets. You also don't need to do dispatch manually when writing manual optimizations--the same function name with different targets is supported and dispatches automatically.
pseudohadamard
Is it actually better/faster though? To see the difference between -O and -O2/3, compile some code for an x64 target on Godbolt and look at the output. -O produces optimised x86 code. -O2/3 produces enormous amounts of incomprehensible SSE/AVX/whatever code for even the simplest stuff, leading to a huge blowout in code size that can potentially interact badly with cacheing. We had a look at this in embedded where you don't have infinite memory to play with and at the moment it's OK because there's no advanced instructions available to use, but it'll get ugly in the future when gcc realises it can use new instructions and produce five times the amount of object code for the same source code.