> BTW, the reason I didn't have a detailed look were the shortened,
> non-descriptive variable names. This is most likely not necessary. It
> makes sense for properties, but variables usually are stored as
> registers (if the compiler chooses to use function2 instead of the old
> function tag, which it normally does for class methods), the names you
> give them in your source code are irrelevant and don't appear in the
> SWF.

I thought so too, but I was trying to follow Steve's version as closely as
possible in order to limit the number of variables (in the experimental
sense) being tested.

>
> Given the minuscule

(but consistent!)

performance difference, I'd go with the original
> (recursive) version for elegance and readability. Unless somebody
> feels like giving mine a work over with flasm, that is, it has more
> potential for bytecode optimizations because the recursive one's
> bottleneck is the function call, and that can't be changed.

I think you're right. I think it's very rare that the kinds of
millisecond-level performance gains you can get in a function have any
serious impact on the average program. It's easy to get focused on tiny
speed gains while ignoring the other places where there are more obvious
bottlenecks, like the rendering engine.

On the other hand, a five-fold speed increase by using instanceof was
certainly worth noticing!

Danny

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to