From 05e0ed4776394ebe860fd28c66b33cb6d7736bdd Mon Sep 17 00:00:00 2001 From: wout Date: Tue, 21 Feb 2017 09:43:13 +0100 Subject: Updated bench --- bench/runner.html | 2 +- bench/svg.bench.js | 2 +- bench/tests/10000-circles.js | 10 +++++----- bench/tests/10000-rects.js | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'bench') diff --git a/bench/runner.html b/bench/runner.html index 9fdc898..e70666c 100644 --- a/bench/runner.html +++ b/bench/runner.html @@ -37,7 +37,7 @@
- + diff --git a/bench/svg.bench.js b/bench/svg.bench.js index 165f87a..ade25d8 100644 --- a/bench/svg.bench.js +++ b/bench/svg.bench.js @@ -37,7 +37,7 @@ // Run tests , run: function() { - this.pad(true) + this.pad() for (var h, i = 0, il = this._chain.length; i < il; i++) { var h = document.createElement('h1') diff --git a/bench/tests/10000-circles.js b/bench/tests/10000-circles.js index 467c26a..da2a3de 100644 --- a/bench/tests/10000-circles.js +++ b/bench/tests/10000-circles.js @@ -1,9 +1,9 @@ SVG.bench.describe('Generate 10000 circles', function(bench) { - bench.skip('using svg.js v2.3.4', function() { + bench.test('using SVG.js v2.4.0', function() { for (var i = 0; i < 10000; i++) bench.draw.circle(100,100) }) - bench.skip('using vanilla js', function() { + bench.test('using vanilla js', function() { for (var i = 0; i < 10000; i++) { var circle = document.createElementNS(SVG.ns, 'circle') circle.setAttributeNS(null, 'rx', 50) @@ -11,14 +11,14 @@ SVG.bench.describe('Generate 10000 circles', function(bench) { bench.raw.appendChild(circle) } }) - bench.skip('using Snap.svg v0.41', function() { + bench.test('using Snap.svg v0.5.1', function() { for (var i = 0; i < 10000; i++) bench.snap.circle(50, 50, 100, 100) }) }) SVG.bench.describe('Generate 10000 circles with fill', function(bench) { - bench.test('using svg.js v2.3.4', function() { + bench.test('using SVG.js v2.4.0', function() { for (var i = 0; i < 10000; i++) bench.draw.circle(100,100).fill('#f06') }) @@ -31,7 +31,7 @@ SVG.bench.describe('Generate 10000 circles with fill', function(bench) { bench.raw.appendChild(circle) } }) - bench.test('using Snap.svg v0.41', function() { + bench.test('using Snap.svg v0.5.1', function() { for (var i = 0; i < 10000; i++) bench.snap.circle(50, 50, 100, 100).attr('fill', '#f06') }) diff --git a/bench/tests/10000-rects.js b/bench/tests/10000-rects.js index d7b6303..c39147f 100644 --- a/bench/tests/10000-rects.js +++ b/bench/tests/10000-rects.js @@ -1,5 +1,5 @@ SVG.bench.describe('Generate 10000 rects', function(bench) { - bench.test('using svg.js v2.3.4', function() { + bench.test('using SVG.js v2.4.0', function() { for (var i = 0; i < 10000; i++) bench.draw.rect(100,100) }) @@ -11,14 +11,14 @@ SVG.bench.describe('Generate 10000 rects', function(bench) { bench.raw.appendChild(rect) } }) - bench.test('using Snap.svg v0.41', function() { + bench.test('using Snap.svg v0.5.1', function() { for (var i = 0; i < 10000; i++) bench.snap.rect(50, 50, 100, 100) }) }) SVG.bench.describe('Generate 10000 rects with fill', function(bench) { - bench.test('using svg.js v2.3.4', function() { + bench.test('using SVG.js v2.4.0', function() { for (var i = 0; i < 10000; i++) bench.draw.rect(100,100).fill('#f06') }) @@ -31,14 +31,14 @@ SVG.bench.describe('Generate 10000 rects with fill', function(bench) { bench.raw.appendChild(rect) } }) - bench.test('using Snap.svg v0.41', function() { + bench.test('using Snap.svg v0.5.1', function() { for (var i = 0; i < 10000; i++) bench.snap.rect(50, 50, 100, 100).attr('fill', '#f06') }) }) SVG.bench.describe('Generate 10000 rects with position and fill', function(bench) { - bench.test('using svg.js v2.3.4', function() { + bench.test('using SVG.js v2.4.0', function() { for (var i = 0; i < 10000; i++) bench.draw.rect(100,100).move(50,50).fill('#f06') }) @@ -53,7 +53,7 @@ SVG.bench.describe('Generate 10000 rects with position and fill', function(bench bench.raw.appendChild(rect) } }) - bench.test('using Snap.svg v0.41', function() { + bench.test('using Snap.svg v0.5.1', function() { for (var i = 0; i < 10000; i++) bench.snap.rect(50, 50, 100, 100).attr('fill', '#f06') }) -- cgit v1.2.3