Simon, On 2/24/06, Kroeger, Simon (ext) <simon.kroeger.ext / siemens.com> wrote: > > Now how can it be that the ruby code is so awfully slow? > > Is that normal for ruby? ... > You got some answers and the short one is 'yes'. The long would be > 'yes, but..' (as allways). Yes, but because you tend to write 'better' > (and often faster) code after a while using ruby. I think the main > reason is that writing 'better' code in C is so painfull. You write > code that is easy to write in C and this code isn't 'good' (it's > still fast enough because C is fast). > > > Or is my implementation so horribly bad? > > Not bad, but not especialy clever. ... > So ruby is 3 times faster than C. *g* > No bad. > > (look at my last solution on http://www.rubyquiz.com/quiz43.html > for the code, but this last one is realy only optimized for speed > so its ugly - perhaps look at the other ones also) Thanks for the clear and educational response. Us lurkers appreciate it. Cameron