← Back to context

Comment by pjc50

9 years ago

Well, the code wasn't compiled by today's compiler, it was compiled in late 2000. Visual Studio 6 maybe?

Even today compilers tend not to optimise the function preamble/postamble away. I'm only half in agreement with the mantra: you probably can beat the compiler, but is it worth it?

There are a few situations where it's genuinely a good idea to write in assembler to be explicit about predictable behaviour. Short security-critical constant-time functions are a good candidate.