[Xorp-cvs] XORP cvs commit: xorp/policy xorp/policy/backend xorp/policy/common xorp/policy/test
Andrea Bittau
abittau at icir.org
Wed Aug 6 01:10:18 PDT 2008
CVSROOT: /usr/local/www/data/cvs
Module name: xorp
Changes by: abittau at chum.icir.org 2008-08-06 08:10:18 UTC
XORP CVS repository
Modified files:
policy visitor_semantic.cc
policy/backend Makefile.am Makefile.in iv_exec.cc
policy/common Jamfile Makefile.am Makefile.in element_base.hh
register_operations.cc
policy/test policybench.cc
Added files:
policy/common element_base.cc
Log message:
Remove more partial objects. Relation operators (e.g., equality) now return a
recycled true/false - not a new true/false object for each operation that
happens. Minor improvement for this policy, but I like the optimization and it
makes the code slightly better with regards to the AsPath recycle "hack". Will
need to refcount Elements properly at some point.
before:
[94% shorty test]# ./policybench -p base -v base.var
Loading...
Benchmarking. Iterations: 100000
Stats:
Total time 616 (ms) iterations 100000
Iterations/s 162337.662
Instr 1 Avg Time 184.419 ( 4.73%)
Instr 2 Avg Time 274.301 ( 7.04%)
Instr 3 Avg Time 717.467 (18.41%)
Instr 4 Avg Time 275.426 ( 7.07%)
Instr 5 Avg Time 245.909 ( 6.31%)
Instr 6 Avg Time 214.429 ( 5.50%)
Instr 7 Avg Time 1181.428 (30.31%)
Instr 8 Avg Time 296.294 ( 7.60%)
Instr 9 Avg Time 214.492 ( 5.50%)
Instr 10 Avg Time 293.896 ( 7.54%)
[94% shorty test]#
Now
[96% shorty test]# ./policybench -p base -v base.var
Loading...
Benchmarking. Iterations: 100000
Stats:
Total time 605 (ms) iterations 100000
Iterations/s 165289.256
Instr 1 Avg Time 225.432 ( 5.93%)
Instr 2 Avg Time 265.847 ( 6.99%)
Instr 3 Avg Time 558.693 (14.68%)
Instr 4 Avg Time 276.084 ( 7.26%)
Instr 5 Avg Time 246.202 ( 6.47%)
Instr 6 Avg Time 212.973 ( 5.60%)
Instr 7 Avg Time 1208.537 (31.77%)
Instr 8 Avg Time 303.655 ( 7.98%)
Instr 9 Avg Time 213.531 ( 5.61%)
Instr 10 Avg Time 293.575 ( 7.72%)
[96% shorty test]#
Note how Instr 3 went down - 28% less cycles. Instr 3 is a comparison of two
prefixes. The comparison itself is rather slow, but at least we don't create a
new boolean object for the result.
Revision Changes Path
1.8 +2 -1; commitid: 839b48995c6541a7; xorp/policy/backend/Makefile.am
1.22 +8 -6; commitid: 839b48995c6541a7; xorp/policy/backend/Makefile.in
1.22 +5 -13; commitid: 839b48995c6541a7; xorp/policy/backend/iv_exec.cc
1.3 +2 -2; commitid: 839b48995c6541a7; xorp/policy/common/Jamfile
1.6 +2 -1; commitid: 839b48995c6541a7; xorp/policy/common/Makefile.am
1.20 +7 -5; commitid: 839b48995c6541a7; xorp/policy/common/Makefile.in
1.1 +53 -0 xorp/policy/common/element_base.cc (new)
1.8 +11 -2; commitid: 839b48995c6541a7; xorp/policy/common/element_base.hh
1.25 +38 -12; commitid: 839b48995c6541a7; xorp/policy/common/register_operations.cc
1.4 +2 -2; commitid: 839b48995c6541a7; xorp/policy/test/policybench.cc
1.18 +3 -3; commitid: 839b48995c6541a7; xorp/policy/visitor_semantic.cc
More information about the Xorp-cvs
mailing list