Lighthouse has a new layout.
Prefer the old one? Return to the old layout,
and switch back any time from the link at the top of each page.
This project is archived and is in readonly mode.
Faster Hash#slice (esp. when key count increases)
#297
See title.
I claim no credit for this patch: credit goes to Grant Hollingworth (see http://merb.lighthouseapp.com/pr...). Just want to get it into Rails since it's trivial. I didn't replicate the Hash#except patch (until someone or I am able to profile memory usage).
Benchmark I used included. These are my results:
user system total real
small hash#slice_current 1.210000 0.000000 1.210000 ( 1.216810)
small hash#slice_patched 0.870000 0.000000 0.870000 ( 0.871604)
user system total real
big hash#slice_current 0.720000 0.000000 0.720000 ( 0.717137)
big hash#slice_patched 0.020000 0.000000 0.020000 ( 0.024483)