[racket] Optimizations at the library level.

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Sep 2 07:20:24 EDT 2010

On Sep  2, Neil Van Dyke wrote:
> Noel Welsh wrote at 09/02/2010 04:49 AM:
> > GHC allows user specified rewrite rules:
> >
> > http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/rewrite-rules.html
> >
> > I don't know how effective they are in practice. 
> 
> Neat.  But I'd be fine with just a hook procedure being called with
> with just the version identifier and whatever intermediate
> representation the compiler happens to have in that version (say, a
> macro-expanded syntax tree with reference annotations).  Beyond that
> point, the IR is simply undocumented internals that can be poked
> around, with no special transformation language required.  An
> optimization programmer can apply whatever pattern-matching or
> whatnot they want to help with the transformation/manipulation.
> [...]

How is the haskell thing different from something like making `map' a
macro?  One obvious difference is that IIUC you can specify these
rules in some random library, which doesn't sound too good.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.