Charles Oliver Nutter wrote:
Attached is a patch that alters yield to always accept IRubyObject[], like a normal call, and changes all callers and implementations to handle that fact. There are ups and downs to this:
I committed the patch; I'm trying to work the kinks out of the compilation patch now. Here's some numbers of interest with the multi-assign compilation in place:
## Uncompiled 1m loops yielding two fixnums 10 times to block accessing one compiled: Object.foo2 5.954000 0.000000 5.954000 ( 5.955000) 5.662000 0.000000 5.662000 ( 5.662000) 5.654000 0.000000 5.654000 ( 5.654000) 5.766000 0.000000 5.766000 ( 5.766000) 5.754000 0.000000 5.754000 ( 5.754000) 1m loops yielding three fixnums 10 times to block accessing one compiled: Object.foo2_5 6.756000 0.000000 6.756000 ( 6.756000) 6.458000 0.000000 6.458000 ( 6.458000) 6.519000 0.000000 6.519000 ( 6.519000) 6.683000 0.000000 6.683000 ( 6.683000) 6.526000 0.000000 6.526000 ( 6.526000) ## Compiled 1m loops yielding two fixnums 10 times to block accessing one compiled: Object.test2 compiled: Object.foo2 3.608000 0.000000 3.608000 ( 3.609000) 3.249000 0.000000 3.249000 ( 3.249000) 3.274000 0.000000 3.274000 ( 3.275000) 3.238000 0.000000 3.238000 ( 3.238000) 3.274000 0.000000 3.274000 ( 3.274000) 1m loops yielding three fixnums 10 times to block accessing one compiled: Object.test3 compiled: Object.foo2_5 4.175000 0.000000 4.175000 ( 4.175000) 3.863000 0.000000 3.863000 ( 3.864000) 3.911000 0.000000 3.911000 ( 3.911000) 3.758000 0.000000 3.758000 ( 3.758000) 3.798000 0.000000 3.798000 ( 3.797000) ## Ruby 1.8.6 1m loops yielding two fixnums 10 times to block accessing one 8.300000 0.020000 8.320000 ( 8.386761) 8.260000 0.030000 8.290000 ( 8.311693) 8.260000 0.020000 8.280000 ( 8.301991) 8.260000 0.020000 8.280000 ( 8.305271) 8.270000 0.020000 8.290000 ( 8.304894) 1m loops yielding three fixnums 10 times to block accessing one 9.250000 0.030000 9.280000 ( 9.384062) 9.230000 0.030000 9.260000 ( 9.282087) 9.240000 0.020000 9.260000 ( 9.312289) 9.210000 0.030000 9.240000 ( 9.260124) 9.230000 0.030000 9.260000 ( 9.336172) - Charlie --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
