Proposition: use a hashtable instead of bsearch to locate applets

Bartosz Gołaszewski bartekgola at gmail.com
Fri May 30 09:16:07 UTC 2014


2014-05-29 18:56 GMT+02:00 Laurent Bercot <ska-dietlibc at skarnet.org>:
>> Does this provided a noticeable performance increase? Do you have
>> benchmarks?

I've checked the times just by looking up all the applets in a loop
and measuring the time using gettimeofday() - the results are: ~220
microseconds for bsearch and ~150 microseconds for hashtable on my
linux laptop. Is it significant? I think so. Is it noticeable?
Probably not. The idea came to me, when thinking about unifying the
hashtables used in busybox. I guess you're right and it isn't really
worth the size increase.

Best regards,
Bartosz Golaszewski


More information about the busybox mailing list