pingjiang / octane-benchmark

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

Code-Load replacement value gets cached #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The bug:
In Code-Load's `cacheBust` function the `replacement` value repeats every so 
often so JS engines hit their cache/optimizations:
https://code.google.com/p/octane-benchmark/source/browse/trunk/code-load.js#1491

To address, you can add `+ seed;` to `replacement += ((salt + i * 7) % 
36).toString(36)`
.. making it `replacement += ((salt + i * 7) % 36).toString(36) + seed;`

You'll notice once you fix the issue with `replacement` in `cacheBust` that 
browsers' scores drop a bit for code-load because they cant leverage their 
internal caches or other opts (it's busting the caches/opts better).

Original issue reported on code.google.com by paulir...@google.com on 22 Jun 2013 at 12:45

GoogleCodeExporter commented 9 years ago
Thanks Paul - we'll have a look.

Original comment by octane.t...@gmail.com on 25 Jun 2013 at 12:28

GoogleCodeExporter commented 9 years ago
Was this fixed in V2?

Original comment by diblidab...@gmail.com on 18 Nov 2013 at 10:46

GoogleCodeExporter commented 9 years ago
Yes, this is fixed with Octane 2.0 by using a true hashing function. Thanks for 
the report to Paul.

Original comment by mstarzinger@chromium.org on 18 Nov 2013 at 12:45