summaryrefslogtreecommitdiff
path: root/pkgsrc/zebra.sh.in
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2011-12-04 23:21:55 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2012-01-02 18:23:24 +0400
commitd171bf58ef12ace43d48565e6870722dece1e6ed (patch)
tree2cdd66f99933f4e0f0d175ce31599cbb6cbb981f /pkgsrc/zebra.sh.in
parent8c7f49d27767886b3706dfca11c1e13abeab7c63 (diff)
lib: optimize ip_masklen()
The new implementation makes use of a 64KB mapping table, which makes it possible to compute masklen faster and with constant execution time. The map also allows for additional version of the function, which can detect errors in input argument. The previous implementation had a variable cost of execution, which depended on masklen in a non-linear manner, and at its worst (/31) was 4 times slower, than the new implementation. The only case of old function just slightly outperforming the new one is /0, which is of little practical interest.
Diffstat (limited to 'pkgsrc/zebra.sh.in')
0 files changed, 0 insertions, 0 deletions