[webkit-reviews] review requested: [Bug 55343] Global JSON and Math should be configurable but aren't : [Attachment 120897] Fix for JSON object

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 2 15:41:25 PST 2012


Gavin Barraclough <barraclough at apple.com> has asked  for review:
Bug 55343: Global JSON and Math should be configurable but aren't
https://bugs.webkit.org/show_bug.cgi?id=55343

Attachment 120897: Fix for JSON object
https://bugs.webkit.org/attachment.cgi?id=120897&action=review

------- Additional Comments from Gavin Barraclough <barraclough at apple.com>
Our current handling of Math & JSON (treating them as non-configurable vars)
allows slightly faster access.	This is probably not significant for typical
JSON loads, since in real world usage the overhead of one property access from
the global object is nothing compared to the cost of loading JSON data over the
network, the host call to the parse function, and running the parser over the
JSON data.  Fast access to the Math object is more important since it is used
for very small, fast intrinsic functions that will be inlined by the JIT, e.g.
abs.  We should fix this bug for the Math object too, but there we will need to
pay more concern to avoiding any performance penalty – in the case of the JSON
object there is no real justification to retain our current incorrect behavior.


More information about the webkit-reviews mailing list