TOKUHIROM MEMO

2010-10-12

benchmark

orig

Benchmark: timing 10000 iterations of get, get_rest, set, set_rest...
       get:  4 wallclock secs ( 1.58 usr +  0.49 sys =  2.07 CPU) @ 4830.92/s (n=10000)
  get_rest: 12 wallclock secs (10.91 usr +  0.39 sys = 11.30 CPU) @ 884.96/s (n=10000)
       set:  4 wallclock secs ( 1.38 usr +  0.33 sys =  1.71 CPU) @ 5847.95/s (n=10000)
  set_rest: 12 wallclock secs (10.70 usr +  0.55 sys = 11.25 CPU) @ 888.89/s (n=10000)

tune-uped.

tokuhirom@gpath% perl -I ../Cache-KyotoTycoon/lib -Ilib ../Cache-KyotoTycoon/benchmarks/with-rest.pl
Benchmark: timing 10000 iterations of get, get_rest, set, set_rest...
       get:  3 wallclock secs ( 1.62 usr +  0.25 sys =  1.87 CPU) @ 5347.59/s (n=10000)
  get_rest:  3 wallclock secs ( 1.11 usr +  0.42 sys =  1.53 CPU) @ 6535.95/s (n=10000)
       set:  3 wallclock secs ( 1.33 usr +  0.38 sys =  1.71 CPU) @ 5847.95/s (n=10000)
  set_rest:  3 wallclock secs ( 0.93 usr +  0.26 sys =  1.19 CPU) @ 8403.36/s (n=10000)

more optimized

       get:  3 wallclock secs ( 1.31 usr +  0.33 sys =  1.64 CPU) @ 6097.56/s (n=10000)
  get_rest:  2 wallclock secs ( 0.98 usr +  0.38 sys =  1.36 CPU) @ 7352.94/s (n=10000)
       set:  4 wallclock secs ( 1.45 usr +  0.37 sys =  1.82 CPU) @ 5494.51/s (n=10000)
  set_rest:  2 wallclock secs ( 0.73 usr +  0.33 sys =  1.06 CPU) @ 9433.96/s (n=10000)