flat assembler
Message board for the users of flat assembler.
Index
> Programming Language Design > [speculative execution] compilers are worse than I thought |
| Author |
|
|
revolution 20 Nov 2026, 20:25
Wrong assumption about the purpose of HLL compilers maybe. HLL compilers aren't suitable for high performance code. That isn't their main purpose. They are meant to be used for "human readable" or "portable" code. Performance is an afterthought, an add-on.
HLL compilers will try to generate code that performs well, and many of them succeed in that goal. But forget about using HLL to create high performance code, they just aren't there. GCC has an even worse option when generating code: -O3. They claim is it can create better performance, but with a lesser guarantee that the code will be correct. IMO that's the worst possible type of code to make, code that doesn't even do its job. There is no point in running faster if it runs in the wrong direction. |
|||
|
|
sylware 21 Nov 2026, 01:21
But I know "human readable" is actually not really true: Proper assembly code does the same, and I know also "code readability" is not a guarantee with "HLL"s... Often the most important is to embrace the whole data model and be able to navigate thru it.
Portability, yeah, the only reason... but if everything goes RISC-V since it is a non IP locked standard, a lot of code paths may be significantly re-usable from one µarchitecture to another one. EDIT: it is getting worse, it seems inlining 'basic functions' is almost "chaotic", as there is all the time enough semantic variations to make the machine code different while pleasing the speculative execution basic rule and doing a bit of branchless logic. Aka, nearly no small/generic set of patterns. |
|||
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.