Investigation: downsides of being generic and correct

Juan Manuel Cabo juanmanuel.cabo at gmail.com
Thu May 16 06:52:00 PDT 2013


On Thursday, 16 May 2013 at 10:35:12 UTC, Dicebot wrote:
> Want to bring into discussion people that are not on Google+. 
> Samuel recently has posted there some simple experiments with 
> bioinformatics and bad performance of Phobos-based snippet has 
> surprised me.
>
> I did explore issue a bit and reported results in a blog post 
> (snippets are really small and simple) : 
> http://dicebot.blogspot.com/2013/05/short-performance-tuning-story.html
>
> One open question remains though - can D/Phobos do better here? 
> Can some changes be done to Phobos functions in question to 
> improve performance or creating bioinformatics-specialized 
> library is only practical solution?


May I also recommend my tool "avgtime" to make simple benchmarks, 
instead of "time" (you can see an ascii histogram as the output):

      https://github.com/jmcabo/avgtime/tree/

For example:

$ avgtime -r10 -h -q  ls
------------------------
Total time (ms): 27.413
Repetitions    : 10
Sample mode    : 2.6 (4 ocurrences)
Median time    : 2.6695
Avg time       : 2.7413
Std dev.       : 0.260515
Minimum        : 2.557
Maximum        : 3.505
95% conf.int.  : [2.2307, 3.2519]  e = 0.510599
99% conf.int.  : [2.07026, 3.41234]  e = 0.671041
EstimatedAvg95%: [2.57983, 2.90277]  e = 0.161466
EstimatedAvg99%: [2.5291, 2.9535]  e = 0.212202
Histogram      :
     msecs: count  normalized bar
       2.5:     2  ####################
       2.6:     4  ########################################
       2.7:     3  ##############################
       3.5:     1  ##########

--jm



More information about the Digitalmars-d mailing list