Re: there is a subtle problem doing: mySlot := obj getSlot(slotname)
Kevin Edwards <[email protected]> Tue, 08 Nov 2011 13:49:06 -0600
| Newsgroups | gmane.comp.lang.io |
|---|---|
| Message-ID | <[email protected]> |
On 11/8/2011 12:03 PM, Jeremy Tregunna wrote: > As such, one lookup on an activatable object is guaranteed to > perform at least 4 lookups, versus 2 in Io, in the average case > however, it'll generate 9 lookups. As such, I fully expected > Acute's performance to be at best half of what Io does. Yeah, that makes sense given that the speed of Ruby's basic method invocation is probably similar to Io's. It's kind of like implementing Io in Io. > Performance characteristics for looping 10 million times, yielded > 2.15 million sends per second on Steve's C Io implementation, and > 512 thousand sends per second on my Ruby Io implementation. I > expected it to be slower given the extra message sending overhead. > > I ultimately opted to remove them, and figure out how much we'd > boost lookup performance, and found a 25% improvement in > performance of the evaluator. Yikes! That is understandable. I imagine that optimization in pure Ruby would entail segmenting and guarding the lookup chains, so they can be safely specialized and cached, which is probably part of what your JIT will do. Thanks for the explanation, Jer. Kevin