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.
Note that it's 3.7x slower in the shipping Safari so it has gotten better.
(In reply to comment #1) > Note that it's 3.7x slower in the shipping Safari so it has gotten better. 4.7x*