pingjiang / octane-benchmark

Automatically exported from code.google.com/p/octane-benchmark
0 stars 0 forks source link

base.js `performance` assignment forces IE and Safari to use fallback #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In base.js there is `var performance = performance || {};`. In IE and Safari 
the `var performance` is initialized as `undefined` which overwrites the 
built-in `performance` object and causes them to use the `Date.now` fallback 
which can cost them on the benchmark. A way to avoid this is to do a simple 
`typeof` check. `if (typeof performance == 'undefined') performance = {};`.

Original issue reported on code.google.com by John.Dav...@gmail.com on 30 Oct 2014 at 10:18