Charles Oliver Nutter wrote:
Something's seriously wrong with the JIT and blocks it can't compile.
Witness this heinous benchmark:
http://pastie.caboo.se/74616
I'm digging into it now, but ideas are welcome.
Looks like it's just missing some of the ObjectSpace-limiting
optimizations we made in the interpreter. Basically, whenever a series
of values is being passed to a yield, it's turning it into a full-fledge
ObjectSpace array, rather than just leaving it a non-OS array (which
improves performance substantially for yields of >1 arguments).
Fix is easy...new results look better:
100k loops yielding a fixnum 10 times to a block that just retrieves dvar
0.922000 0.000000 0.922000 ( 0.921000)
0.478000 0.000000 0.478000 ( 0.479000)
0.323000 0.000000 0.323000 ( 0.322000)
0.313000 0.000000 0.313000 ( 0.313000)
0.312000 0.000000 0.312000 ( 0.312000)
100k loops yielding two fixnums 10 times to block accessing one
0.768000 0.000000 0.768000 ( 0.768000)
0.453000 0.000000 0.453000 ( 0.452000)
0.431000 0.000000 0.431000 ( 0.431000)
0.449000 0.000000 0.449000 ( 0.449000)
0.483000 0.000000 0.483000 ( 0.482000)
100k loops yielding three fixnums 10 times to block accessing one
0.702000 0.000000 0.702000 ( 0.702000)
0.465000 0.000000 0.465000 ( 0.466000)
0.476000 0.000000 0.476000 ( 0.476000)
0.466000 0.000000 0.466000 ( 0.466000)
0.475000 0.000000 0.475000 ( 0.475000)
100k loops yielding three fixnums 10 times to block splatting and
accessing them
0.588000 0.000000 0.588000 ( 0.588000)
0.529000 0.000000 0.529000 ( 0.530000)
0.529000 0.000000 0.529000 ( 0.529000)
0.535000 0.000000 0.535000 ( 0.536000)
0.554000 0.000000 0.554000 ( 0.554000)
100k loops yielding a fixnums 10 times to block with just a fixnum (no vars)
0.480000 0.000000 0.480000 ( 0.480000)
0.315000 0.000000 0.315000 ( 0.316000)
0.313000 0.000000 0.313000 ( 0.313000)
0.315000 0.000000 0.315000 ( 0.315000)
0.324000 0.000000 0.324000 ( 0.324000)
100k loops calling a method with a fixnum that just returns it
0.518000 0.000000 0.518000 ( 0.518000)
0.438000 0.000000 0.438000 ( 0.438000)
0.429000 0.000000 0.429000 ( 0.429000)
0.411000 0.000000 0.411000 ( 0.411000)
0.397000 0.000000 0.397000 ( 0.397000)
- Charlie
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email