Bioperl-guts: SeqIO/Fasta.pm vs myFasta.pm

Ewan Birney birney@sanger.ac.uk
Sat, 24 Apr 1999 17:29:25 +0100 (BST)


On Fri, 23 Apr 1999, Ian Korf wrote:

> I too did a affine-gap SW in perl for fun. And it is fun. I also did one in
> C. The C version runs 200 times faster! A friend did a java conversion and
> it runs about half as fast as the perl in interpreted mode and 1/10 as fast
> as C using the JIT. Interestingly, in java, most of the time is spent
> allocating memory via "new". If you use native types it takes much less time
> though (separate matricies for score and direction instead of a matrix of
> objects). I think that 1/10 was using native types. Here's another thing that
> I did for fun (in both perl and C): extract the boundaries between your HSPs,
> snip out the corresponding genomic sequence, and run a global alignment over
> them with GT-AG bonuses. It's like ESTgenome but runs hundreds of times faster.
> I don't think perl is a good place for DP really. CPU's may be cheap, but not
> that cheap. I built the C version into a perl module and it runs something
> like 2 times faster than Ewan's pSW.

I need to recompile the pSW stuff with the latest dynamite compiler
sometime as I've got more performance out of it. But pSW does have quite a
bit of generic setup that a well designed hand coded thing doesn't need
so I'm not surprised that you've got this 2 fold speed up.

But if it is faster, why don't we drop the pSW stuff and put in your stuff
(actually, I can think of one - pretty serious - distinction. pSW will use
linear memory if memory is a problem and I guess yours just allocated a 
n*m matrix straight off. pSW can run in tiny memory if need be which is a
bit of a bonus).


> 
> -Ian
> =========== Bioperl Project Mailing List Message Footer =======
> Project URL: http://bio.perl.org
> For info about how to (un)subscribe, where messages are archived, etc:
> http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl-guts.html
> ====================================================================
> 

Ewan Birney
<birney@sanger.ac.uk>
http://www.sanger.ac.uk/Users/birney/

=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl-guts.html
====================================================================