True, and this is my biggest problem with writing optimized code in C -- it takes a lot of guessing and inspecting the generated assembler and understanding your particular platform to make sure you're ACTUALLY utilizing registers and cache like you intend.
If there were some way of expressing this intent through the language and have the compiler enforce it, that'd be fantastic :)
That said, there's really not a better solution to the problem than C, just pointing out that even C is often far less than ideal in this arena.
If there were some way of expressing this intent through the language and have the compiler enforce it, that'd be fantastic :)
That said, there's really not a better solution to the problem than C, just pointing out that even C is often far less than ideal in this arena.