On Thu, Nov 1, 2012 at 11:04 AM, Adam Barth <aba...@webkit.org> wrote: > On Thu, Nov 1, 2012 at 10:51 AM, Alexey Proskuryakov <a...@apple.com> wrote: >> 01.11.2012, в 10:36, Adam Barth <aba...@webkit.org> написал(а): >>> Today, we use ScriptWrappable for Nodes only, but we would benefit by >>> making more use of ScriptWrappable, particularly for DOM objects that >>> almost always have JavaScript wrappers. For example, XMLHttpRequest >>> objects exist only when created by script, which means that every >>> XMLHttpRequest object has a JavaScript wrapper. >> >> This looks like a great idea for investigation to me. >> >> Do you have a rough estimate of how large of a win we are talking about? > > I don't have numbers currently, but I'm happy to gather some. My > recollection is that the win for nodes was substantial on DOM > benchmarks. I would expect the win to be fairly large for DOM objects > like NodeList where script is likely to access properties like length > and item frequently (e.g., in a loop).
Definitely. The last I checked, we spent 3-5% just looking for the wrapper in the hash map when iterating over NodeList items. - Ryosuke _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev