Live data from Hacker News

Is Ruby Fast Yet?

isrubyfastyet.com

81–90 of 95 posts

Re: Is Ruby Fast Yet?

#81
post #16

Without knowing what runtimes and parameters are used it's really hard to tell what's going on in this benchmark; JRuby can see 100% and sometimes more improvement on many workloads by tweaking JVM options. It looks like JRuby is just run under the system JRE (which is what?) with no additional options; that's going to be slow for most workloads. It'd be nice to see a lot more documentation around the runtime configu…

Down the bottom he states that it is running on Osx. The fan is premptively spun up, which gives Jruby a speed boost. It's probably going to run even faster with proper cooling.

Re: Is Ruby Fast Yet?

#82
post #16

Without knowing what runtimes and parameters are used it's really hard to tell what's going on in this benchmark; JRuby can see 100% and sometimes more improvement on many workloads by tweaking JVM options. It looks like JRuby is just run under the system JRE (which is what?) with no additional options; that's going to be slow for most workloads. It'd be nice to see a lot more documentation around the runtime configu…

Down the bottom he states that it is running on Osx. The fan is premptively spun up, which gives Jruby a speed boost. It's probably going to run even faster with proper cooling.

Re: Is Ruby Fast Yet?

#83
post #16

Without knowing what runtimes and parameters are used it's really hard to tell what's going on in this benchmark; JRuby can see 100% and sometimes more improvement on many workloads by tweaking JVM options. It looks like JRuby is just run under the system JRE (which is what?) with no additional options; that's going to be slow for most workloads. It'd be nice to see a lot more documentation around the runtime configu…

Down the bottom he states that it is running on Osx. The fan is premptively spun up, which gives Jruby a speed boost. It's probably going to run even faster with proper cooling.

Re: Is Ruby Fast Yet?

#84

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.…

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).

Re: Is Ruby Fast Yet?

#85

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 know you were just going with what was already on your system most likely, but wouldn't it be a good idea to compare against a more up to date version of Python (version 3.3.x) and Lua (5.2.x)? Lua 5.1 initial release was in 2006[1] Python 2.7 initial release was in 2010[2] Ruby 2.0 initial release was in 2013[3] [1] http://www.lua.org/versions.html#5.1 [2] http://en.wikipedia.org/wiki/History_of_Python#Version_rel…

Good call. I'm not sure how I ended up with that version of Lua. I'll upgrade to the latest of the others when I get a chance.

Re: Is Ruby Fast Yet?

#87

Earlier quoted context omitted.

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…

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

Re: Is Ruby Fast Yet?

#89

Earlier quoted context omitted.

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…

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. F…

> I just meant that in my experience it's healthy to have something to aspire to

I had actually thought that's what I was doing when I compared it to Lua! I was quite surprised at how well Wren did in comparison. The trick will be to see if I can keep it that fast as the implementation gets more robust. It takes some shortcuts right now that don't scale well, but happen to be faster.

> I really want Jeff to write a little book about it, walking the reader through the implementation.

I would love that. I've skimmed femtolisp a few times and it's clean but suffers from the almost total lack of documentation that other programming language implementations also seem to have.

Re: Is Ruby Fast Yet?

#90

Earlier quoted context omitted.

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. F…

> I just meant that in my experience it's healthy to have something to aspire to I had actually thought that's what I was doing when I compared it to Lua! I was quite surprised at how well Wren did in comparison. The trick will be to see if I can keep it that fast as the implementation gets more robust. It takes some shortcuts right now that don't scale well, but happen to be faster. > I really want Jeff to write a l…

I don't think that the standard Lua implementation is especially fast – it's the LuaJIT implementation that's so impressively fast.

Programming language implementors do seem to be even less fond of writing comments than most programmers, don't they? I think one of the issues is that internals can change a lot fairly quickly and dealing with comments just makes that worse.

Post reply on HN