http://qs1969.pair.com?node_id=348344


in reply to Re: May Thy Closures Be Blessed
in thread May Thy Closures Be Blessed

I get an 18% difference, not a 3%

Hmm. I do seem to have been lucky with my initial runs. I'm seeing between 3-10% on my box, but nothing near 18%. How odd.

Unfortunally, this technique can't be used if you are subclassing a class that doesn't coorperate

True. Although for hash based objects you could just use one slot for the key and still get safety for all your other state hashes.

I would have expected to be able to gain a little more by writing the methods like ...

Good point. Can any internals expert explain why +shift is so slow?