WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
133924
Bracket access is significantly slower than property access
https://bugs.webkit.org/show_bug.cgi?id=133924
Summary
Bracket access is significantly slower than property access
Ryosuke Niwa
Reported
2014-06-14 23:05:59 PDT
Created
attachment 233135
[details]
Microbenchmark function getByVal(object, property) { return object[property]; } function getById(object) { return object.myProperty; } The first function appears to be ~3.5x slower than the second function even if getByVal is always called as getByVal(object, 'myProperty'). It's only 1.5x slower on Chrome 35 and 2.2x slower on Firefox 30.
Attachments
Microbenchmark
(1.03 KB, text/html)
2014-06-14 23:05 PDT
,
Ryosuke Niwa
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2014-06-14 23:07:14 PDT
Note that it's 3.7x slower in the shipping Safari so it has gotten better.
Ryosuke Niwa
Comment 2
2014-06-14 23:07:27 PDT
(In reply to
comment #1
)
> Note that it's 3.7x slower in the shipping Safari so it has gotten better.
4.7x*
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug