Skip to content

Instantly share code, notes, and snippets.

@jruby
Created December 23, 2009 01:24
Show Gist options
  • Save jruby/262242 to your computer and use it in GitHub Desktop.
Save jruby/262242 to your computer and use it in GitHub Desktop.
BEFORE:
Java 5 client (worst case):
user system total real
near closure, 1000k x100 gets 5.241000 0.000000 5.241000 ( 5.240000)
near closure, 1000k x100 gets and sets 6.342000 0.000000 6.342000 ( 6.342000)
in closure, 1000k x100 gets 5.486000 0.000000 5.486000 ( 5.486000)
in closure, 1000k x100 gets and sets 7.522000 0.000000 7.522000 ( 7.522000)
near closure, 5 vars, 1000k * x100 gets 5.534000 0.000000 5.534000 ( 5.534000)
near closure, 5 vars, 1000k * x100 gets and sets 8.473000 0.000000 8.473000 ( 8.473000)
in closure, 5 vars, 1000k x100 gets 6.273000 0.000000 6.273000 ( 6.273000)
in closure, 5 vars, 1M x100 gets and sets 9.465000 0.000000 9.465000 ( 9.465000)
user system total real
1m x10 yield 1 to { } 2.653000 0.000000 2.653000 ( 2.653000)
1m x10 yield to { } 2.546000 0.000000 2.546000 ( 2.546000)
1m x10 yield 1 to {|j| j} 3.174000 0.000000 3.174000 ( 3.174000)
1m x10 yield 1,2 to {|j,k| k} 3.589000 0.000000 3.589000 ( 3.589000)
1m x10 yield 1,2,3 to {|j,k,l| k} 3.917000 0.000000 3.917000 ( 3.917000)
1m x10 yield to {|j,k,l| k} 3.629000 0.000000 3.629000 ( 3.629000)
1m x10 yield 1,2,3 to {|*j| j} 4.676000 0.000000 4.676000 ( 4.676000)
1m x10 yield to {1} 2.962000 0.000000 2.962000 ( 2.962000)
1m x10 call() to a_method(p); p; end 3.080000 0.000000 3.080000 ( 3.080000)
Java 6 64-bit server (best case):
user system total real
near closure, 1000k x100 gets 2.313000 0.000000 2.313000 ( 2.313000)
near closure, 1000k x100 gets and sets 3.186000 0.000000 3.186000 ( 3.186000)
in closure, 1000k x100 gets 2.394000 0.000000 2.394000 ( 2.394000)
in closure, 1000k x100 gets and sets 3.516000 0.000000 3.516000 ( 3.515000)
near closure, 5 vars, 1000k * x100 gets 2.378000 0.000000 2.378000 ( 2.378000)
near closure, 5 vars, 1000k * x100 gets and sets 3.504000 0.000000 3.504000 ( 3.503000)
in closure, 5 vars, 1000k x100 gets 4.374000 0.000000 4.374000 ( 4.374000)
in closure, 5 vars, 1M x100 gets and sets 3.652000 0.000000 3.652000 ( 3.652000)
user system total real
1m x10 yield 1 to { } 1.010000 0.000000 1.010000 ( 1.010000)
1m x10 yield to { } 1.006000 0.000000 1.006000 ( 1.006000)
1m x10 yield 1 to {|j| j} 1.215000 0.000000 1.215000 ( 1.215000)
1m x10 yield 1,2 to {|j,k| k} 1.420000 0.000000 1.420000 ( 1.420000)
1m x10 yield 1,2,3 to {|j,k,l| k} 1.551000 0.000000 1.551000 ( 1.551000)
1m x10 yield to {|j,k,l| k} 1.469000 0.000000 1.469000 ( 1.469000)
1m x10 yield 1,2,3 to {|*j| j} 2.095000 0.000000 2.095000 ( 2.095000)
1m x10 yield to {1} 1.095000 0.000000 1.095000 ( 1.095000)
1m x10 call() to a_method(p); p; end 1.115000 0.000000 1.115000 ( 1.115000)
AFTER:
Java 5 client:
user system total real
near closure, 1000k x100 gets 0.246000 0.000000 0.246000 ( 0.246000)
near closure, 1000k x100 gets and sets 1.655000 0.000000 1.655000 ( 1.655000)
in closure, 1000k x100 gets 0.227000 0.000000 0.227000 ( 0.227000)
in closure, 1000k x100 gets and sets 1.736000 0.000000 1.736000 ( 1.736000)
near closure, 5 vars, 1000k * x100 gets 0.227000 0.000000 0.227000 ( 0.227000)
near closure, 5 vars, 1000k * x100 gets and sets 0.544000 0.000000 0.544000 ( 0.545000)
in closure, 5 vars, 1000k x100 gets 0.270000 0.000000 0.270000 ( 0.270000)
in closure, 5 vars, 1M x100 gets and sets 4.803000 0.000000 4.803000 ( 4.803000)
user system total real
1m x10 yield 1 to { } 2.492000 0.000000 2.492000 ( 2.492000)
1m x10 yield to { } 2.366000 0.000000 2.366000 ( 2.366000)
1m x10 yield 1 to {|j| j} 2.458000 0.000000 2.458000 ( 2.458000)
1m x10 yield 1,2 to {|j,k| k} 3.962000 0.000000 3.962000 ( 3.961000)
1m x10 yield 1,2,3 to {|j,k,l| k} 4.183000 0.000000 4.183000 ( 4.183000)
1m x10 yield to {|j,k,l| k} 3.406000 0.000000 3.406000 ( 3.406000)
1m x10 yield 1,2,3 to {|*j| j} 5.134000 0.000000 5.134000 ( 5.134000)
1m x10 yield to {1} 2.420000 0.000000 2.420000 ( 2.420000)
1m x10 call() to a_method(p); p; end 3.067000 0.000000 3.067000 ( 3.067000)
Java 6 64-bit server:
user system total real
near closure, 1000k x100 gets 0.127000 0.000000 0.127000 ( 0.127000)
near closure, 1000k x100 gets and sets 0.235000 0.000000 0.235000 ( 0.235000)
in closure, 1000k x100 gets 0.129000 0.000000 0.129000 ( 0.129000)
in closure, 1000k x100 gets and sets 1.006000 0.000000 1.006000 ( 1.006000)
near closure, 5 vars, 1000k * x100 gets 0.113000 0.000000 0.113000 ( 0.113000)
near closure, 5 vars, 1000k * x100 gets and sets 0.179000 0.000000 0.179000 ( 0.180000)
in closure, 5 vars, 1000k x100 gets 0.115000 0.000000 0.115000 ( 0.115000)
in closure, 5 vars, 1M x100 gets and sets 1.718000 0.000000 1.718000 ( 1.718000)
user system total real
1m x10 yield 1 to { } 0.927000 0.000000 0.927000 ( 0.926000)
1m x10 yield to { } 0.914000 0.000000 0.914000 ( 0.914000)
1m x10 yield 1 to {|j| j} 0.934000 0.000000 0.934000 ( 0.934000)
1m x10 yield 1,2 to {|j,k| k} 1.591000 0.000000 1.591000 ( 1.592000)
1m x10 yield 1,2,3 to {|j,k,l| k} 1.669000 0.000000 1.669000 ( 1.669000)
1m x10 yield to {|j,k,l| k} 1.627000 0.000000 1.627000 ( 1.628000)
1m x10 yield 1,2,3 to {|*j| j} 1.954000 0.000000 1.954000 ( 1.953000)
1m x10 yield to {1} 0.903000 0.000000 0.903000 ( 0.903000)
1m x10 call() to a_method(p); p; end 1.330000 0.000000 1.330000 ( 1.330000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment