[Yarv-devel] Speedup
Daniel Amelang
danny at amelang.net
Wed Apr 27 04:00:47 EDT 2005
I've attached a zip file with the program (just the beginning of it;
I've just started, really). It's called riposuc and it does structural
comparision of proteins. If you want input data files for the program, I
can send those too.
There are three files:
bsearch.rb for performing a binary search on sorted arrays
riposuc.rb is the module that does most of the work. Actually, most of
the work is just in the score_against method of the RIPOSUC::Protein class.
score.rb is the 'driver' that is invoked from the command line
It's about 200 lines total, so it should be easy to get an idea of what
it's doing.
About your question, I do quite a bit of float comparisons, Math.sqrt
and **2. I know I can do x*x instead of x**2, but I haven't really
reached that level of optimization yet. The code is already pretty messy
already with ugly speed optimizations.
Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: riposuc.zip
Type: application/zip
Size: 2419 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/yarv-devel/attachments/20050427/c393d1a5/riposuc.zip
More information about the Yarv-devel
mailing list