[Webkit-unassigned] [Bug 151233] New: Set existence with numeric values slower than numeric object property existence
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 12 16:34:17 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=151233
Bug ID: 151233
Summary: Set existence with numeric values slower than numeric
object property existence
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: joepeck at webkit.org
CC: keith_miller at apple.com, sbarati at apple.com,
utatane.tea at gmail.com
Created attachment 265448
--> https://bugs.webkit.org/attachment.cgi?id=265448&action=review
[TEST] Set Existence Benchmark
* SUMMARY
Set existence with numeric values slower than numeric object property existence.
In Web Inspector we were converting a bunch of uses of "Object as Set" and "Object as Map" to Set/Map objects. I wrote a small benchmark to compare possible performance differences. Existence checks for large dense Sets with primitives is worse than existence checks in large dense Objects.
object[number] - 17ms
number in object - 84ms
set.has(number) - 622ms
For numeric keys object was significantly faster than Set.
For other key types the effect was not as large.
See attached test case.
* NOTES
- Not sure how realistic the test is for real world code. Especially given Set's major advantage is non-primitive keys.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151113/69df593d/attachment.html>
More information about the webkit-unassigned
mailing list