User Tools

Site Tools


benchmark

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

benchmark [2010/04/04 20:40]
admin
benchmark [2014/01/18 07:44]
Line 1: Line 1:
-====== Benchmark of G-language GAE ====== 
- 
-Here we show benchmark comparison of G-language GAE 1.8.11 and BioPerl 1.5.2. 
- 
-===== GenBank loading (regular) ===== 
- 
-<code perl> 
-use Benchmark; 
-use G; 
-use Bio::SeqIO; 
- 
-$count = 100; 
-$value = "​NC_000913.gbk";​ 
- 
-timethese($count,​ 
-          {'​G-language'​ => '&​test1;',​ '​BioPerl'​ => '&​test2;',​ }); 
- 
-sub test1 { 
-    $str = $value; 
-    my $gb = new G($value, "no msg"); 
-} 
- 
-sub test2 { 
-    $str = $value; 
-    my $in = Bio::​SeqIO->​new(-file=>​$value,​ '​-format'​=>'​GenBank'​);​ 
-    my $seq = $in->​next_seq();​ 
-} 
-</​code>​ 
-<​code>​ 
-Benchmark: timing 100 iterations of BioPerl, G-language... 
-   ​BioPerl:​ 746 wallclock secs (743.09 usr +  2.70 sys = 745.79 CPU) @  0.13/s (n=100) 
-G-language: 23 wallclock secs (22.31 usr +  0.52 sys = 22.83 CPU) @  4.38/s (n=100) 
-</​code>​ 
- 
-__**G-language GAE is 32x faster.**__ 
-===== GenBank loading (without cache) ===== 
- 
-<code perl> 
-use Benchmark; 
-use G; 
-use Bio::SeqIO; 
- 
-$count = 100; 
-$value = "​NC_000913.gbk";​ 
- 
-timethese($count,​ 
-          {'​G-language'​ => '&​test1;',​ '​BioPerl'​ => '&​test2;',​ }); 
- 
-sub test1 { 
-    $str = $value; 
-    my $gb = new G($value, "no msg", "no cache"​);​ 
-} 
- 
-sub test2 { 
-    $str = $value; 
-    my $in = Bio::​SeqIO->​new(-file=>​$value,​ '​-format'​=>'​GenBank'​);​ 
-    my $seq = $in->​next_seq();​ 
-} 
-</​code>​ 
-<​code>​ 
-Benchmark: timing 100 iterations of BioPerl, G-language... 
-   ​BioPerl:​ 747 wallclock secs (743.60 usr +  2.70 sys = 746.30 CPU) @  0.13/s (n=100) 
-G-language: 105 wallclock secs (104.07 usr +  0.82 sys = 104.89 CPU) @  0.95/s (n=100) 
-</​code>​ 
- 
-__**G-language GAE is 7x faster.**__ 
  
benchmark.txt ยท Last modified: 2014/01/18 07:44 (external edit)