3 ms·
The irony is that for modern processors, generated assembly tends to be faster, because the required optimization is so specific, manually crafting it can almos
by slver 5y ago
The irony is that for modern processors, generated assembly tends to be faster, because the required optimization is so specific, manually crafting it can almost never match an optimizing compiler.
But I get the spirit of what you said.
- capableweb 5y ago> The irony is that for modern processors, generated assembly tends to be faster, because the required optimization is so specific, manually crafting it can almost never match an optimizing compiler. That's interesting, haven't heard of that before. You happen to know of any comparisons that show the difference? Or some other resource on the subject. > But I get the spirit of what you said. Thanks for not being overtly anal about it, which tends to be the norm :)
- fulafel 5y agoThe language wasn't mentioned but often the alternative to assembler is C. C compilers beating hand written assembly comes up in pretty much every discussion of the subject. You can still beat the compiler in many cases if you iterate and analyze enough, but that won't be the case in the first-pass code you'd write. There are some exceptions in areas where compilers have weaknesses, like SIMD code. The thread context is ClojureScript and JavaScript, I think people don't compare JSVM JIT code to hand written assembly that often (tip: node --print-opt-code --print-opt-code-filter=myfunction).