1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-02 04:49:02 +00:00
david 3a67da3a7e Improve the efficiency of loading the nmap-services file. We now use an STL map
instead of a custom hash table and an STL list instead of a custom linked list.
The biggest gain comes from using the list.sort method rather than inserting
ports in sorted order (equivalent to insertion sort). The new code passes
Doug's p-switch-tests.

Here are time comparisons, using the old and new services code, and using the
standard nmap-services file and the 65535-port nmap-services-huge. The times
are the duration of the call to nmap_services_init. Three trials were done for
each case, except for the old-code/nmap-services-huge case.

nmap-services:
old code:   0.215  0.201  0.227  (average   0.214 s)
new code:   0.025  0.022  0.023  (average   0.023 s)

nmap-services-huge:
old code: 441.014                (average 441.014 s)
new code:   0.984  0.975  0.978  (average   0.979 s)
2008-08-13 01:19:09 +00:00
2008-06-15 07:05:12 +00:00
2008-08-02 21:21:49 +00:00
2008-08-01 08:26:35 +00:00
2008-06-29 09:13:44 +00:00
2008-07-31 14:18:21 +00:00
2008-05-31 02:39:27 +00:00
2006-12-11 00:34:26 +00:00
2008-05-31 08:22:39 +00:00
2008-05-31 02:39:27 +00:00
2008-07-31 14:17:12 +00:00
2008-05-31 02:39:27 +00:00
2008-05-31 02:39:27 +00:00
2005-06-24 23:50:23 +00:00
2008-07-15 20:06:05 +00:00
2008-07-15 20:06:05 +00:00

Here is some documentation for Nmap, but these files are much less
comprehensive than what you'll find at the actual Nmap documentation
site ( http://nmap.org ).
Languages
C 37.8%
Lua 28.1%
C++ 16.7%
Shell 5.8%
Python 4.2%
Other 7.2%