On Thu, Feb 22, 2007 at 18:25:22 +0200, Sami Farin wrote:
> On Thu, Feb 22, 2007 at 14:21:29 +0200, Sami Farin wrote:
> ...
> > Note that surf() now does 8 loops instead of 16.
> > If someone shows it's easy to crack now, tell me.
>
> And when doing for PTR queries n.n.n.10.in-addr.arpa
> which all result into NXDOMAIN (queries to localhost):
> 35,678,022 dns_packet.c:dns_packet_getname
> [/usr/local/src/djbdns-1.05-epoll/dnscache]
> 34,732,154 dns_random.c:dns_random
> [/usr/local/src/djbdns-1.05-epoll/dnscache]
> 19,614,387 dns_domain.c:dns_domain_free
> [/usr/local/src/djbdns-1.05-epoll/dnscache]
> ...
>
> So if you feel courageous, modify surf() to do 4 loops :)
What the heck.
I removed the expensive unconditional divide in dns_random
(used in randombind and in generating of random DNS ID)
and upgraded surf to DJB's ecrypt submission salsa20
(with 8 iterations instead of 20).
Also, it returns uint16 instead of unsigned int.
It's now ~ten times faster than the original.
Also, 16 expensive divides were optimized out of query.c:doit()
by inlining and optimizing dns_sortip().
Make sure your version does not have "div" or equivalent insn
in query.s after doing "gcc -S query.c".
--
djbdns-1.05-epoll-20070222T160840Z-20070304T144118Z.diff
Description: Text document
pgpfJCvjLe9Sd.pgp
Description: PGP signature
|