From: Dmitry Nikiforov Date: 2012-02-03T11:19:32+09:00 Subject: Re: Basic Ruby performance Jeremy Bopp wrote in post #1043805: > (0..1E7).each do > s =~ / test / > end Hmmm... Didn't realize this would make difference :) Thanks! > Don't get hung up on micro benchmarks like the above though! They can > really be deceiving with respect to real world applications. Well, I started doing these benchmarks after I've tried to rewrite parts of the project I'm working on in Ruby. The project is rather complicated, so it seemed as if Ruby's neat, clean syntax would make it easier to handle, but the performance was dreadful. Initially I tried 1.8.7 that came natively with OS X Lion, then installed 1.9.3, without much difference in performance - it's still mostly multiple times slower than the Perl version I have :( The problem with Perl version, though, is that once it reaches certain limit - it becomes rather hard to manage (especially so if you focus on performance the most - there are tricks in Perl that make code run significantly faster, but make it virtually unreadable). -- Posted via http://www.ruby-forum.com/.