Nmap Development mailing list archives
Re: Performance thoughts
From: Fyodor <fyodor () insecure org>
Date: Tue, 4 Jul 2006 16:11:18 -0700
On Wed, Jul 05, 2006 at 12:57:10AM +0200, majek04 wrote:
Of course you're right, here are some tests:(Debian sid on x86) Compilation: "./configure --without-openssl" Test: "callgrind ./nmap -sS -n -T5 127.0.0.1/22 -p22" Default nmap compilation: C(XX)FLAGS="" 32.51s user 0.39s system 99% cpu 33.115 total The same with debugging information: C(XX)FLAGS="-g" 30.85s user 0.37s system 99% cpu 31.317 total And with forced optimizations: C(XX)FLAGS="-O0" 30.44s user 0.37s system 99% cpu 31.019 total C(XX)FLAGS="-O1" 8.10s user 0.28s system 99% cpu 8.432 total C(XX)FLAGS="-O2" 7.07s user 0.29s system 99% cpu 7.403 total
Does your patch make a difference with -O2?
We see that removing "-g" changes nothing. It seems that default nmap compilation is done without any "-O".
Something is wrong if you aren't getting -O2. I just tried the nmap 4.20ALPHA3 tarball (and also my SVN version) and get this for the .cc files: g++ -c -Ilibdnet-stripped/include -g -O2 -Wall -fno-strict-aliasing -Ilibpcap -Inbase -Insock/include -DHAVE_CONFIG_H -DNMAP_VERSION=\"4.20ALPHA3\" -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://www.insecure.org/nmap/\" -DNMAP_PLATFORM=\"x86_64-unknown-linux-gnu\" -DNMAPDATADIR=\"/usr/local/share/nmap\" nmap.cc -o nmap.o Now the final linking command probably doesn't use -O2, but I don't think it would do anything there.
I like these graphs. What are you using to create them?Like Richard Moore suggested, callgrind and kcachegrind.
Neat. Cheers, -F _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev
Current thread:
- Performance thoughts majek04 (Jul 03)
- Re: Performance thoughts Fyodor (Jul 04)
- Re: Performance thoughts majek04 (Jul 04)
- Re: Performance thoughts Fyodor (Jul 04)
- Re: Performance thoughts majek04 (Jul 04)
- Re: Performance thoughts majek04 (Jul 04)
- Re: Performance thoughts Diman Todorov (Jul 04)
- Re: Performance thoughts Fyodor (Jul 04)
- Re: Performance thoughts Fyodor (Jul 04)