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

Re: fstrcmp



On Tue, 2009-06-02 at 10:28 -0400, Michael Poole wrote:
> I have some relevant experience that makes me skeptical about needing
> sophisticated structures to achieve acceptable performance

Some concrete numbers:

- naive fstrcmp comparisons (using edit distance, lifted from GNU
Gettext)
- list of names obtained from apt-cache dumpavail
- 2.1GHz x86

- looking for "dnsutl"

0.000008008 = 0.215 sec / 26866 pair
that's 8.0us per fstrcmp call

- looking for "dns-server-utilities"

0.000015816 = 0.425 sec / 26866 pair
that's 15us per fstrcmp call

For me, adding ~0.3 second to the error case in order to provide a far
better error message would appear to be worth it, especially as this is
less than the existing 0.532s reported by "time sudo apt-get install
dnsutl" (not including I/O time) on the same system.

I/O time when none of the package data is in cache is > 9 seconds,
confirming what Martin has been saying... and ~30 times longer than the
fstrcmp overhead.


I will have version 0.1 ready shortly.


Regards
Peter Miller <millerp@opensource.org.au>
/\/\*        http://miller.emu.id.au/pmiller/

PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53  2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.

"A computer is like air conditioning: it becomes useless when you open
windows." -- Linus Torvalds


Reply to: