Hacker News new | ask | show | jobs
by wtracy 4843 days ago
Very cool.

I remember hearing that the disallowal of pointer aliasing was the main reason that it was possible for a Fortran compiler to produce code that could outperform code from a C compiler: It allows the compiler to perform a new class of optimizations.

It would appear that the restrict keyword lets C programs regain that class of compiler optimizations.

1 comments

It's pretty well explained here

http://en.wikipedia.org/wiki/Restrict