Open petdance opened 13 years ago
+1. Does this mean that we will not sticking to ANSI 89 C compilers? Or will we only generate the restrict keyword when the compiler has shown to support it?
Don't know. That's why it says "look at".
I just brought iit over from Trac since it was created by and assigned to me.
MSVC has __restrict, which provides a subset of the C99 restrict
functionality, ie there's no real reason not to use it as it's available on all major platform; the Parrot codebase already uses non-C90 features, btw, so that shouldn't be an issue either...
Esp. nqp 6model would benefit from it, parrot not so I guess. We don't have that much aliasing going on. But I'll look into it.
The
restrict
keyword can lead to improved optimizations by the compiler: http://en.wikipedia.org/wiki/RestrictGCC 4.5 "now makes better use of the information provided by the restrict keyword... to generate better optimized code." https://lwn.net/SubscriberLink/387122/4555e15215cc7faf/
Look to see if we can get any performance benefits from it.
Here's a good blog post about the
restrict
qualifier: http://lbrandy.com/blog/2010/06/you-cant-beat-a-good-compile/