[Dnsmasq-discuss] [Request for Comments] Optimized Nearest-Domain Lookup

Jason A. Donenfeld Jason at zx2c4.com
Thu Feb 21 09:24:19 GMT 2013


On Wed, Feb 20, 2013 at 9:53 PM, Jason A. Donenfeld <Jason at zx2c4.com> wrote:

> Okie dokie, benchmark time! 2012 Intel Core i7, gcc 4.7.2.
>

Looks like gcc was optimizing out the legacy test. Fixed that, and added
some data verification.

zx2c4 at thinkpad ~/Projects/domain-lookup-tree $ make
cc -march=native -pipe -fomit-frame-pointer -flto -O3    test.c
domain-lookup.c domain-lookup.h   -o test
cc -march=native -pipe -fomit-frame-pointer -flto -O3    benchmark.c
domain-lookup.c domain-lookup.h   -o benchmark

zx2c4 at thinkpad ~/Projects/domain-lookup-tree $ ./benchmark
[+] Populating in memory word list.
[+] Creating random lists of domains to query.
[+] Populating domain lookup tree.
[+] Performing lookup benchmarks:
    [*] New method took 0.370000 seconds.
    [*] Old method took 188.770000 seconds.
[+] Verifying that new and old methods produced identical results:
    [*] New and old methods produced the same results.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20130221/6523a177/attachment.html>


More information about the Dnsmasq-discuss mailing list