diff --git a/benchmarks/binarytree.ce b/benchmarks/binarytree.ce index aa6d7877..74c2d680 100644 --- a/benchmarks/binarytree.ce +++ b/benchmarks/binarytree.ce @@ -34,8 +34,8 @@ function itemCheck(node) { function bottomUpTree(depth) { return depth > 0 - ? new TreeNode(bottomUpTree(depth - 1), bottomUpTree(depth - 1)) - : new TreeNode(null, null); + ? TreeNode(bottomUpTree(depth - 1), bottomUpTree(depth - 1)) + : TreeNode(null, null); } mainThread() diff --git a/benchmarks/js_perf.ce b/benchmarks/js_perf.ce index a3ece022..8f38062f 100644 --- a/benchmarks/js_perf.ce +++ b/benchmarks/js_perf.ce @@ -151,13 +151,12 @@ function benchObjectCreation() { }); function Point(x, y) { - this.x = x; - this.y = y; + return {x,y} } var defructorTime = measureTime(function() { for (var i = 0; i < iterations.medium; i++) { - var p = new Point(i, i * 2); + var p = Point(i, i * 2); } }); diff --git a/benchmarks/nbody.ce b/benchmarks/nbody.ce index 61847cca..5786127c 100644 --- a/benchmarks/nbody.ce +++ b/benchmarks/nbody.ce @@ -3,17 +3,11 @@ var SOLAR_MASS = 4 * pi * pi; var DAYS_PER_YEAR = 365.24; function Body(x, y, z, vx, vy, vz, mass) { - this.x = x; - this.y = y; - this.z = z; - this.vx = vx; - this.vy = vy; - this.vz = vz; - this.mass = mass; + return {x, y, z, vx, vy, vz, mass}; } function Jupiter() { - return new Body( + return Body( 4.84143144246472090e+00, -1.16032004402742839e+00, -1.03622044471123109e-01, @@ -25,7 +19,7 @@ function Jupiter() { } function Saturn() { - return new Body( + return Body( 8.34336671824457987e+00, 4.12479856412430479e+00, -4.03523417114321381e-01, @@ -37,7 +31,7 @@ function Saturn() { } function Uranus() { - return new Body( + return Body( 1.28943695621391310e+01, -1.51111514016986312e+01, -2.23307578892655734e-01, @@ -49,7 +43,7 @@ function Uranus() { } function Neptune() { - return new Body( + return Body( 1.53796971148509165e+01, -2.59193146099879641e+01, 1.79258772950371181e-01, @@ -61,7 +55,7 @@ function Neptune() { } function Sun() { - return new Body(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SOLAR_MASS); + return Body(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SOLAR_MASS); } var bodies = Array(Sun(), Jupiter(), Saturn(), Uranus(), Neptune()); diff --git a/benchmarks/wota.ce b/benchmarks/wota.ce index d4f0b97c..f8d4cbc5 100644 --- a/benchmarks/wota.ce +++ b/benchmarks/wota.ce @@ -66,12 +66,6 @@ def benchmarks = [ data: [ array(1000, i => i *0.5) ], iterations: 1000 }, - { - name: "Large Binary Blob (256KB)", - // A 256KB ArrayBuffer - data: [ new Uint8Array(256 * 1024).buffer ], - iterations: 200 - } ]; // Print a header