[Xorp-cvs] XORP cvs commit: xorp/policy/backend xorp/policy/test

Andrea Bittau abittau at icir.org
Wed Aug 6 01:09:42 PDT 2008


CVSROOT:	/usr/local/www/data/cvs
Module name:	xorp
Changes by:	abittau at chum.icir.org	2008-08-06 08:09:42 UTC

XORP CVS repository


Modified files:
	policy/backend iv_exec.cc 
	policy/test   file_varrw.cc file_varrw.hh 

Log message:
	make file varrw use an array rather than an STL map for loading/storing
	variables.  This allows me to factor out the overhead of varrw from my
	benchmarks.  It also highlights how important varrw's performance is.
	
	before:
	
	[47% 02:08 shorty test]# ./policybench -p base -v base.var  -i 100000
	Loading...
	Benchmarking.  Iterations: 100000
	Stats:
	Total time 838 (ms) iterations 100000
	Iterations/s 119331.742
	Instr  1 Avg Time    184.390    ( 2.54%)
	Instr  2 Avg Time    640.111    ( 8.83%)
	Instr  3 Avg Time    769.805    (10.62%)
	Instr  4 Avg Time    295.817    ( 4.08%)
	Instr  5 Avg Time    701.665    ( 9.68%)
	Instr  6 Avg Time    213.541    ( 2.95%)
	Instr  7 Avg Time   1172.950    (16.18%)
	Instr  8 Avg Time    609.467    ( 8.41%)
	Instr  9 Avg Time    215.179    ( 2.97%)
	Instr 10 Avg Time   2446.334    (33.75%)
	[47% 01:40 shorty test]#
	
	After
	
	[38% 01:29 shorty test]# ./policybench -p base -v base.var  -i 100000
	Loading...
	Benchmarking.  Iterations: 100000
	Stats:
	Total time 616 (ms) iterations 100000
	Iterations/s 162337.662
	Instr  1 Avg Time    217.243    ( 5.63%)
	Instr  2 Avg Time    278.346    ( 7.22%)
	Instr  3 Avg Time    845.059    (21.91%)
	Instr  4 Avg Time    278.638    ( 7.22%)
	Instr  5 Avg Time    244.301    ( 6.33%)
	Instr  6 Avg Time    218.084    ( 5.65%)
	Instr  7 Avg Time    973.631    (25.24%)
	Instr  8 Avg Time    292.371    ( 7.58%)
	Instr  9 Avg Time    213.429    ( 5.53%)
	Instr 10 Avg Time    295.803    ( 7.67%)
	[38% 01:27 shorty test]#
	
	instr 2 and 5 are loads.  8 and 10 are stores.  They've all come down quite a
	bit.  36% improvement in execution time.  Will need to add support for choosing
	the VarRW implementation (e.g., BGP's) in policybench soon.

Revision  Changes                               Path
1.21      +7 -5;  commitid: 834948995c4241a7;   xorp/policy/backend/iv_exec.cc
1.15      +10 -7;  commitid: 834948995c4241a7;  xorp/policy/test/file_varrw.cc
1.12      +2 -4;  commitid: 834948995c4241a7;   xorp/policy/test/file_varrw.hh



More information about the Xorp-cvs mailing list