Revision: 4658
Author: [email protected]
Date: Sun May 16 22:59:20 2010
Log: Incorporate feedback from issue 679 and issue 690 into the
benchmark suite thus forming a new candidate benchmark revision:

  * Remove dead code from RayTrace benchmark.
  * Avoid repeated number-to-string conversion in Splay.

Review URL: http://codereview.chromium.org/2086005
http://code.google.com/p/v8/source/detail?r=4658

Modified:
 /branches/bleeding_edge/benchmarks/README.txt
 /branches/bleeding_edge/benchmarks/base.js
 /branches/bleeding_edge/benchmarks/raytrace.js
 /branches/bleeding_edge/benchmarks/revisions.html
 /branches/bleeding_edge/benchmarks/run.html
 /branches/bleeding_edge/benchmarks/splay.js

=======================================
--- /branches/bleeding_edge/benchmarks/README.txt       Wed Jul  8 00:35:14 2009
+++ /branches/bleeding_edge/benchmarks/README.txt       Sun May 16 22:59:20 2010
@@ -61,3 +61,11 @@
 the Object.prototype.inherits function in the DeltaBlue benchmark to
 inheritsFrom to avoid name clashes when running in Chromium with
 extensions enabled.
+
+
+Changes from Version 5 to Version 6
+===================================
+
+Removed dead code from the RayTrace benchmark and changed the Splay
+benchmark to avoid converting the same numeric key to a string over
+and over again.
=======================================
--- /branches/bleeding_edge/benchmarks/base.js  Tue May 26 06:28:51 2009
+++ /branches/bleeding_edge/benchmarks/base.js  Sun May 16 22:59:20 2010
@@ -78,7 +78,7 @@
 // Scores are not comparable across versions. Bump the version if
 // you're making changes that will affect that scores, e.g. if you add
 // a new benchmark or change an existing one.
-BenchmarkSuite.version = '5';
+BenchmarkSuite.version = '6 (candidate)';


 // To make the benchmark results predictable, we replace Math.random
=======================================
--- /branches/bleeding_edge/benchmarks/raytrace.js      Tue May 12 01:23:11 2009
+++ /branches/bleeding_edge/benchmarks/raytrace.js      Sun May 16 22:59:20 2010
@@ -205,12 +205,6 @@
         this.intensity = (intensity ? intensity : 10.0);
     },

-    getIntensity: function(distance){
-        if(distance >= intensity) return 0;
-
-        return Math.pow((intensity - distance) / strength, 0.2);
-    },
-
     toString : function () {
return 'Light [' + this.position.x + ',' + this.position.y + ',' + this.position.z + ']';
     }
@@ -420,31 +414,6 @@
 if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
 if(typeof(Flog.RayTracer.Shape) == 'undefined') Flog.RayTracer.Shape = {};

-Flog.RayTracer.Shape.BaseShape = Class.create();
-
-Flog.RayTracer.Shape.BaseShape.prototype = {
-    position: null,
-    material: null,
-
-    initialize : function() {
-        this.position = new Vector(0,0,0);
-        this.material = new Flog.RayTracer.Material.SolidMaterial(
-            new Flog.RayTracer.Color(1,0,1),
-            0,
-            0,
-            0
-        );
-    },
-
-    toString : function () {
- return 'Material [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']';
-    }
-}
-/* Fake a Flog.* namespace */
-if(typeof(Flog) == 'undefined') var Flog = {};
-if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
-if(typeof(Flog.RayTracer.Shape) == 'undefined') Flog.RayTracer.Shape = {};
-
 Flog.RayTracer.Shape.Sphere = Class.create();

 Flog.RayTracer.Shape.Sphere.prototype = {
=======================================
--- /branches/bleeding_edge/benchmarks/revisions.html Wed Jul 8 00:35:14 2009 +++ /branches/bleeding_edge/benchmarks/revisions.html Sun May 16 22:59:20 2010
@@ -20,6 +20,13 @@

 </p>

+<div class="subtitle"><h3>Version 6 (<a href="http://v8.googlecode.com/svn/data/benchmarks/v6/run.html";>link</a>)</h3></div>
+
+<p>Removed dead code from the RayTrace benchmark and changed the Splay
+benchmark to avoid converting the same numeric key to a string over
+and over again.
+</p>
+
<div class="subtitle"><h3>Version 5 (<a href="http://v8.googlecode.com/svn/data/benchmarks/v5/run.html";>link</a>)</h3></div>

 <p>Removed duplicate line in random seed code, and changed the name of
=======================================
--- /branches/bleeding_edge/benchmarks/run.html Wed Jul 15 03:37:10 2009
+++ /branches/bleeding_edge/benchmarks/run.html Sun May 16 22:59:20 2010
@@ -111,12 +111,12 @@
<li><b>Richards</b><br>OS kernel simulation benchmark, originally written in BCPL by Martin Richards (<i>539 lines</i>).</li> <li><b>DeltaBlue</b><br>One-way constraint solver, originally written in Smalltalk by John Maloney and Mario Wolczko (<i>880 lines</i>).</li> <li><b>Crypto</b><br>Encryption and decryption benchmark based on code by Tom Wu (<i>1698 lines</i>).</li> -<li><b>RayTrace</b><br>Ray tracer benchmark based on code by <a href="http://flog.co.nz/";>Adam Burmister</a> (<i>935 lines</i>).</li> -<li><b>EarleyBoyer</b><br>Classic Scheme benchmarks, translated to JavaScript by Florian Loitsch's Scheme2Js compiler (<i>4685 lines</i>).</li> +<li><b>RayTrace</b><br>Ray tracer benchmark based on code by <a href="http://flog.co.nz/";>Adam Burmister</a> (<i>904 lines</i>).</li> +<li><b>EarleyBoyer</b><br>Classic Scheme benchmarks, translated to JavaScript by Florian Loitsch's Scheme2Js compiler (<i>4684 lines</i>).</li> <li><b>RegExp</b><br>Regular expression benchmark generated by extracting regular expression operations from 50 of the most popular web pages
 (<i>1614 lines</i>).
 </li>
-<li><b>Splay</b><br>Data manipulation benchmark that deals with splay trees and exercises the automatic memory management subsystem (<i>378 lines</i>).</li> +<li><b>Splay</b><br>Data manipulation benchmark that deals with splay trees and exercises the automatic memory management subsystem (<i>379 lines</i>).</li>
 </ul>

 <p>
=======================================
--- /branches/bleeding_edge/benchmarks/splay.js Tue May 12 01:23:11 2009
+++ /branches/bleeding_edge/benchmarks/splay.js Sun May 16 22:59:20 2010
@@ -46,16 +46,16 @@
 var splayTree = null;


-function GeneratePayloadTree(depth, key) {
+function GeneratePayloadTree(depth, tag) {
   if (depth == 0) {
     return {
       array  : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
-      string : 'String for key ' + key + ' in leaf node'
+      string : 'String for key ' + tag + ' in leaf node'
     };
   } else {
     return {
-      left:  GeneratePayloadTree(depth - 1, key),
-      right: GeneratePayloadTree(depth - 1, key)
+      left:  GeneratePayloadTree(depth - 1, tag),
+      right: GeneratePayloadTree(depth - 1, tag)
     };
   }
 }
@@ -74,7 +74,8 @@
   do {
     key = GenerateKey();
   } while (splayTree.find(key) != null);
-  splayTree.insert(key, GeneratePayloadTree(kSplayTreePayloadDepth, key));
+  var payload = GeneratePayloadTree(kSplayTreePayloadDepth, String(key));
+  splayTree.insert(key, payload);
   return key;
 }

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to