sefer

Posts tagged with “ruby”

 

ruby GP performance pt.2 December 19

And with ruby 1.9.2p0

sammael:rubyGP greay$ time ruby tinyGP.rb 

real    0m12.546s
user    0m11.819s
sys 0m0.631s

MacRuby definitely seems to be the winner here...


 

ruby GP December 18

I recently started reading A Field Guide to Genetic Programming ... Barely in to it at all yet, but I've decided to rewrite the sample code (TinyGP) in Ruby. Because I like Ruby better than Java.

It's very short. And the (very rough) ruby implementation w/o much anything special done to it is quite a bit shorter – down from 12KB to 8, and I really didn't take anything out. That's just the extra cruft that Java requires. For all I know the ruby implementation is orders of magnitude slower, though, I don't know. Hell, I've barely tested it so I don't even know it works.

The code's @ github.