Performance on some benchmarks (eg Euler.as) is highly sensitive to ArrayObject::getUintProperty being fast. In the current compiler configuration, it happens that _getUintProperty is inlined into the (virtual) implementation of getUintProperty; however, it seems that minor tweaks to the contents (eg methods of AtomArray) can change this behavior, causing getUintProperty to tail-call to _getUintProperty instead, which is significantly slower. We should restructure the code to explicitly force the function to be inlined, to avoid such inadvertent slowdowns.
Created attachment 465003 [details] [diff] [review] Patch -- Move contents of _getUintProperty into a really-inlined getUintPropertyImpl. -- (virtual) getUintProperty, _getUintProperty, and _getIntProperty all explicitly call getUintPropertyImpl. -- added note to the _get/_set int/uint property calls that they are only for use by JIT or ArrayObject. (friend access is painful due to the way they are used by jit-calls.h, so a comment will have to suffice.) -- scope creep: get/setIntProperty (no underscore) aren't called anywhere in the VM, and only in a handful of places in Flash/AIR, and all of those are inappropriate (getUintProperty is more appropriate as the index is always positive)... so they were removed entirely. -- scope creep: added some missing "-inlines.h" files to the xcode project.
Comment on attachment 465003 [details] [diff] [review] Patch Bonus points if you explain in a comment /how/ _getUintProperty differs from getUintProperty, and not simply that most users should call the latter. (With the proviso that I'm just looking at the patch and not seeing enough context.)
Attachment #465003 - Flags: review?(lhansen) → review+
Point taken, patch will be annotated with comments from this bug before pushing.
pushed to redux as http://hg.mozilla.org/tamarin-redux/rev/7b69fbca6b8f
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.