> > You'd want to do the following: > - add some bounds checking in `increment-ptr' and `decrement-ptr'. > - change the `vector' operations to their `unsafe-vector' counterparts. > - change `sub1' and `add1' to use `unsafe-fx+' and `unsafe-fx-' > - change `=' to `unsafe-fx=' > - change the uses of `set-state-ptr!' and `state-ptr' and such to use > `unsafe-struct-set!' and `unsafe-struct-ref'. > > All of those will almost certainly improve performance.
Yup, this is done now. > Other ideas: > - defining the semantics functions as macros, to produce inlining. Yes, this too is done now. > - lifting out the definition of the state vector and pointer to the > top level, so that you don't have to reference the state all the time. > > Those I'm less sure will improve performance. > > It would be even better if you wrote it up as an optimization section. :) I think I'll do that... but only after I finish Whalesong. I'm not intending to present the bf compiler during RacketCon. :) _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users