Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Much as I take his overall point - that a close to the metal language is not always best for performance - the author would be well advised to take a look at the C99 restrict keyword.


Just looked it up... looks like you're right. The whole blog post is nonsense.


Just asking, does currently available compilers support restrict? (or C99 standards)?

I use msvc mostly and gcc sometimes.


gcc certainly does (use -std=c99). If you don't want to use C99, use __restrict__ to use it as a gcc extension. This is C-specific - I don't believe a similar standard has worked its way into C++ yet, although compilers may have extensions that support it. I don't know about msvc, I'm afraid.

GCC's C99 implementation is mostly complete - you can find out more here: http://gcc.gnu.org/c99status.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: