Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Describing degerate dna strings

Reply
Thread Tools

Describing degerate dna strings

 
 
George George
Guest
Posts: n/a
 
      01-17-2009

> You probably need to execute each variant in a loop multiple times to
> get meaningful results.
>
> Kind regards
>
> robert


Thanks robert here are the results ran 100000 times for each approach

require 'benchmark'

iterations = 100000
Benchmark.bm do |bm|

bm.report("Brian:") do

iterations.times do
expand_seq "t[ac][tc]aaattaag[ga]gaag[ac]ttggtgga" do |seq|
# puts seq
end
end
end

bm.report("Jesus:") do
iterations.times do
/t[ac][tc]aaattaag[ga]gaag[ac]ttggtgga/.generate
end
end
end

user system total real
Brian: 36.500000 2.080000 38.580000 ( 38.738666)
Jesus: 217.180000 30.710000 247.890000 (248.848401)



--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Jesús Gabriel y Galán
Guest
Posts: n/a
 
      01-17-2009
On Sat, Jan 17, 2009 at 2:13 PM, George George
<> wrote:

> Thanks robert here are the results ran 100000 times for each approach
>
> user system total real
> Brian: 36.500000 2.080000 38.580000 ( 38.738666)
> Jesus: 217.180000 30.710000 247.890000 (248.848401)


It shows that a specialized solution could be more streamlined .
Anyway, my solution was never optimized for performance. Could be an
interesting project...

Jesus.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
~ **DNA,RNA Related Bio Technology** ~ sano Digital Photography 0 07-13-2007 10:34 AM
Describing pipelined hardware Jonathan Bromley VHDL 50 06-22-2006 03:23 PM
describing a file system in xml uvts_cvs@yahoo.com XML 0 03-11-2005 10:02 AM
What am I describing? Gloria Goitre Computer Support 5 02-12-2005 04:05 AM
syntax/notation used in describing c's grammar ben C Programming 4 08-20-2004 07:38 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57