Re:Recursion via Pascal
by TimJYoung on Thursday January 13, 2011 @08:01AM
(#2099625)
One option would be to have the language (in this case Pascal) support a hint keyword that indicates that p is side-effect-free and doesn't modify any global data, or any data outside of its local scope. Then the compiler can use a simple common subexpression elimination optimization. The SQL 2003 standard does this with functions in order to aid the implementor's compiler/optimizer ability to optimize functions that don't modify or read any data and are purely functional.
[ Parent
| on HN ]
There are no comments on this comment yet.