I've been hacking on a little scripting language of my own lately[1]. To get a handle on its perf, I have a few small benchmarks[2] I run that compare it against Lua (5.1.5), Python (2.7.5), and Ruby (2.0.0p247). (All of those and my language are bytecode-compiled, dynamically typed languages, hence that comparison.)

I happen to have Ruby 2.0 installed, and I was surprised to see it handily beat the other languages. I had expected Ruby to be the slowest of the pack, but they've apparently made big strides in 2.0.

On the off chance that anyone is curious, here's the results of running them on my machine:

    binary_trees - wren   3531  0.28s\n    binary_trees - lua    1366  0.73s  258.40%\n    binary_trees - python 1420  0.70s  248.64%\n    binary_trees - ruby   3170  0.32s  111.39%\n\n    fib - wren            2688  0.37s\n    fib - lua             2998  0.33s   89.65%\n    fib - python          1390  0.72s  193.38%\n    fib - ruby            3645  0.27s   73.74%\n\n    for - wren            9092  0.11s\n    for - lua             9387  0.11s   96.86%\n    for - python          3171  0.32s  286.74%\n    for - ruby            8319  0.12s  109.30%\n\n    method_call - wren    4703  0.21s\n    method_call - lua     1780  0.56s  264.20%\n    method_call - python   806  1.24s  583.33%\n    method_call - ruby    3408  0.29s  138.02%\n
\nThose numbers are score, time, and percentage. Score is basically 1/time, just to yield a number where bigger is better. Time is best of ten runs. Percentage is how my language's score compares to that one. So, for example, the 264.20% lua method_call score means my language is about 2.6x faster than Lua on a benchmark designed to stress dynamic method call performance.

[1] https://github.com/munificent/wren\n[2] https://github.com/munificent/wren/tree/master/benchmark

Oh, man, this reminds me of the pain of writing even the most trivial microbenchmarks in seven or eight languages. How about throwing in some of the fast scripting languages for healthy competition? E.g. JavaScript, LuaJIT and Julia. Feel free to borrow (MIT licensed, but I'm willing to relicense whatever I can):

https://github.com/JuliaLang/julia/tree/master/test/perf/mic...

I'm certainly impressed by those implementations, but I don't think I'm competing with them. :)

I had JS (using node) in there for a while, but it was regularly 10x compared to the other languages. Using a JIT makes it effectively a different class of implementation. It's like entering a car in a bike race.

Thanks for the benchmarks! I might steal some of those. They may be more arithmetic focused than I need (which makes sense for Julia, but less sense for an embedding scripting language where most math is probably done in the host app).

It was a turn of phrase, but really I just meant that in my experience it's healthy to have something to aspire to – that's why we always compare to fully optimized C and Fortran. It's easy to fall into an "interpreter bubble" and forget that there's a whole other realm of performance out there. And of course, interpreters can be quite fast – CPython is no slouch and Wren is giving it a run for its money, so kudos. Femtolisp [1] (which we use for Julia's parser) is a great example of a small and simple, yet fast and featureful interpreter. I really want Jeff to write a little book about it, walking the reader through the implementation.

[1] https://github.com/JeffBezanson/femtolisp