From: gabriele renzi Date: 2005-06-10T00:30:28+09:00 Subject: Re: python/ruby benchmark. " ha scritto: > I took a look at > http://shootout.alioth.debian.org/benchmark.php?test=all&lang=ruby&lang2=python&sort=fullcpu > and found the tests on ruby disapointing :(. > So what I'm asking for is a link to some ruby-specific optimisation tips. a simple thing: do the most normal thing instead of writing code in ruby that is innatural, i.e. instead of rewritine an heapsort by hand, use the builtin sort/sort!/sort_by routines. Instead of writing a random function by hand, use the builtin rand(). If you really feel ruby (or python) is slow you can act later optimizing it, not doing it before you ever need to be faster. "premature optimization is the root of all evil", people say.