Sun 2009-10-04 ( En pr )

In my tests, Ruby 1.8.7 runs simple benchmarks about 3-8% faster than 1.8.6 – that’s nice!

But Ruby 1.9.1 is far more fast, with speedups up to 2x for some real-life cases, and a reliable speedup around 10-20%.

JRuby performs better than 1.8, sometimes even better than 1.9, but only for longer tasks. For short benchmarks and day-to-day tasks, it’s often 2 or 3 times slower than any C-Ruby. The startup time is around 1 second, and thus JRuby is not the right tool for scripting tasks. It runs best on Java 6.

Compared to Python, PHP, Perl etc., Ruby feels equally fast to me. That is, well-written Ruby code can perform as good as well-written code in any other dynamic language (with the exception of OCaml, maybe). Bad-written code is no benchmark at all.

Say something! / Sag was!

I think there is à jruby ng version, did you try how that affects performance for longer running ng servers? As in JITing the core libs after some time?
Licenser @ 07:35 on Tuesday, 2009-11-03
What's ng?
murphy @ 19:40 on Tuesday, 2009-11-03
NG - Nailgun, is a method for Java to work around the startup time (and I think the end of optimization for short runs).

http://blog.headius.com/2009/05/jruby-nailgun-support-in-130.html
Licenser @ 21:15 on Tuesday, 2009-11-03
Yeah, that works. Startup is still slower than C-Ruby, but it's much faster than without ng. But I consider it a bit of cheating; much like Adobe Reader, MS Office, ICQ etc. starting themselves via Autostart into the Windows tray bar to achieve the same effect.

It comes at a high memory cost: the ng server blew up to 320MB RAM after running the CodeRay benchmark once, and doesn't seem to free the memory again. It stays around 400MB on subsequent calls.

Also, it doesn't quit the task when I Ctrl-C the original jruby call. That would be really bad for runaway scripts (many TextMate commands do that.)

Definitely worth a look, but needs more refinement IMO. I added it into CodeRay's Rakefile (use rake jng).
murphy @ 22:45 on Tuesday, 2009-11-03
1
aYlNlfdX @ 19:32 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:32 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:36 on Tuesday, 2024-08-06
1
aYlNlfdX @ 19:36 on Tuesday, 2024-08-06
1
aYlNlfdX @ 20:03 on Tuesday, 2024-08-06
1
aYlNlfdX @ 20:03 on Tuesday, 2024-08-06

No markup, just plain monospace text. / Kein Markup, nur Normschrift-Klartext.