| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 | 73 |
| 74 // Keep track of all declared benchmark suites. | 74 // Keep track of all declared benchmark suites. |
| 75 BenchmarkSuite.suites = []; | 75 BenchmarkSuite.suites = []; |
| 76 | 76 |
| 77 | 77 |
| 78 // Scores are not comparable across versions. Bump the version if | 78 // Scores are not comparable across versions. Bump the version if |
| 79 // you're making changes that will affect that scores, e.g. if you add | 79 // you're making changes that will affect that scores, e.g. if you add |
| 80 // a new benchmark or change an existing one. | 80 // a new benchmark or change an existing one. |
| 81 BenchmarkSuite.version = '6'; | 81 BenchmarkSuite.version = '7'; |
| 82 | 82 |
| 83 | 83 |
| 84 // To make the benchmark results predictable, we replace Math.random | 84 // To make the benchmark results predictable, we replace Math.random |
| 85 // with a 100% deterministic alternative. | 85 // with a 100% deterministic alternative. |
| 86 Math.random = (function() { | 86 Math.random = (function() { |
| 87 var seed = 49734321; | 87 var seed = 49734321; |
| 88 return function() { | 88 return function() { |
| 89 // Robert Jenkins' 32 bit integer hash function. | 89 // Robert Jenkins' 32 bit integer hash function. |
| 90 seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff; | 90 seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff; |
| 91 seed = ((seed ^ 0xc761c23c) ^ (seed >>> 19)) & 0xffffffff; | 91 seed = ((seed ^ 0xc761c23c) ^ (seed >>> 19)) & 0xffffffff; |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 } catch (e) { | 275 } catch (e) { |
| 276 suite.NotifyError(e); | 276 suite.NotifyError(e); |
| 277 return null; | 277 return null; |
| 278 } | 278 } |
| 279 return RunNextSetup; | 279 return RunNextSetup; |
| 280 } | 280 } |
| 281 | 281 |
| 282 // Start out running the setup. | 282 // Start out running the setup. |
| 283 return RunNextSetup(); | 283 return RunNextSetup(); |
| 284 } | 284 } |
| OLD | NEW |