From: "Shot (Piotr Szotkowski)" Date: 2008-06-24T22:57:02+09:00 Subject: Re: RubyToC - Second Question --1y6imfT/xHuCvpN0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Philip Rhoades: > The reason I am interested is that I have CPU and IO intensive C/C++ > genetics simulation program that I would love to rewrite in Ruby but > it probably would not be viable from a speed point of view. As David Masover already pointed out, an approach you could consider is to write everything in Ruby first, then profile using ruby-prof, see which stuff calls which other stuff way too much and optimise this, then speed up the outstanding slow parts by adjusting their algorithms, and only then, if you can=E2=80=99t speed them up any more algorythmically, use RubyInline to rewrite the bottlenecks (in place!) to C. This is the approach I took when writing my PhD =E2=80=93 but I can=E2=80= =99t say I got to the =E2=80=98using RubyInline=E2=80=99 part yet, so it can=E2=80=99t be = taken as a working example=E2=80=A6 -- Shot --=20 Jesus is coming. Look busy. --1y6imfT/xHuCvpN0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFIYP8si/mCfdEo8UoRAl75AJ9+bhi9r8g28RfBp/hM7smilQPC8gCgyTlQ vGitCgsiAz/9gBXjwQvUr5A= =Psv2 -----END PGP SIGNATURE----- --1y6imfT/xHuCvpN0--