[racket] Tutorial: writing a language (brainf*ck) in Racket
On 6/20/11 5:37 PM, Danny Yoo wrote:
> For comparison, here are the numbers I'm seeing from the PyPy tutorial
> example1.py (using pypy b590cf6de419):
>
> fermi ~/local/pypy-tutorial $ echo 100 | time
> ~/local/pypy/bin/pypy example1.py prime.b
> Primes up to: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67
> 71 73 79 83 89 97
> 16.72user 0.24system 0:17.18elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (0major+3554minor)pagefaults 0swaps
>
>
> So, yes, my original implementation was a bit slower than the PyPy
> one, but I can blame the slowdown to a few simply factors that are
> purely accidental, not intrinsic. The combination of the simple
> optimizations that Sam suggested, as well as replacing the runtime
> parameterization with syntax-parameterize, results in about a 30x
> speedup.
Hi Danny,
Cool stuff, but you might want to compare to this example in PyPy:
http://morepypy.blogspot.com/2011/04/tutorial-part-2-adding-jit.html
If you get numbers, please share them here!
David