RESOLVED DUPLICATE of bug 67727 21703
Devirtualize JSValue::toBoolean()
https://bugs.webkit.org/show_bug.cgi?id=21703
Summary Devirtualize JSValue::toBoolean()
Cameron Zwarich (cpst)
Reported 2008-10-16 23:12:21 PDT
Currently JSValue::toBoolean() is implemented with a virtual call. While this is avoidable in general, due to the ability to override toBoolean() in the JavaScriptGlue API, we should be able to speed up the common case and use a bit in the StructureID TypeInfo for the slow case.
Attachments
Patch for JavaScriptCore (19.24 KB, patch)
2008-10-17 02:49 PDT, Cameron Zwarich (cpst)
no flags
Cameron Zwarich (cpst)
Comment 1 2008-10-17 02:49:22 PDT
Created attachment 24456 [details] Patch for JavaScriptCore Maciej sent me his earlier toBoolean() patch, which ignored the fact that JavaScriptGlue exposes the ability to overload toBoolean(). It was a small speedup, but this new patch, which adds a TypeInfo bit to account for that, is a small slowdown. The way to speed it up is probably to inline the fast cases into machine code.
Gavin Barraclough
Comment 2 2011-09-09 20:18:26 PDT
This will now be fixed by 67727. *** This bug has been marked as a duplicate of bug 67727 ***
Note You need to log in before you can comment on or make changes to this bug.