From: Eric Mahurin Date: 2005-06-29T21:37:16+09:00 Subject: Re: yield does not take a block --- Robert Klemme wrote: > Note though that yield and &c.call work quite differently. > This has for example performance implications. I didn't know about this advantage. From my quick benchmarks, I found yield to take half the time as Proc#call in a loop with the block being empty. I'd imagine the performance difference is because yield is working with a statically typed Proc, whereas call is using a normal dynamically typed object to #call. I'd imagine as ruby matures, the performance difference between these two would become negligible or zero. I'd hope at some point ruby would make optimizations when it knows the exact class of an object - do method lookup at compile time. __________________________________ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail