[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: Re: BLAST+ speed & build issues



On 08/04/2011 12:02 PM, Olivier Sallou wrote:
> Hi,
> we have a package on DebianMed which has performance issue regarding
> static build vs dynamic link build (latest gcc)
> Has only impacted compile option is the static vs dynamic choice, has
> anyone an idea on where we could investigate or how we could speedup this?
> 
> For a simple "-h" call, here is a benchmark:
> 
> # Static build"
> osallou@debiansid:/tmp/ncbi-blast-2.2.25+-src/debian/ncbi-blast+/usr/bin$ time
> bash -c 'for (( c=1; c<=50; c++ )) ; do ./blastx -h > /dev/null ; done'
> 
> real    0m0.403s
> user    0m0.292s
> sys    0m0.124s
> 
> # Dynamic build
> osallou@debiansid:/tmp/ncbi-blast-2.2.25+-src/debian/ncbi-blast+/usr/bin$ time
> bash -c 'for (( c=1; c<=50; c++ )) ; do blastx -h > /dev/null ; done'
> 
> real    0m8.002s
> user    0m4.200s
> sys    0m3.856s
> 
> 

Hi,
unless the purpose of this program is to display help messages to stdout
this is hardly a meaningful benchmark.
Starting a dynamic linked library is slower than starting a static one,
but that does not yet mean the dynamic version will be so much slower
when its running.
You might be able to reduce startup time by only linking against the
libraries you need or lazyly dynamically loading them.
using ld --as-needed is the solution for the former, but see bug 633567
for problems with this.

Best Regards,
Julian Taylor

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: