From 0510c9b111aed03d0d3680db63614d50f231745c Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 10 Sep 2014 14:22:26 +1200 Subject: Client-side framework for web application --- web/src/vendor/benchmark/example/jsperf/index.html | 287 +++++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 web/src/vendor/benchmark/example/jsperf/index.html (limited to 'web/src/vendor/benchmark/example/jsperf/index.html') diff --git a/web/src/vendor/benchmark/example/jsperf/index.html b/web/src/vendor/benchmark/example/jsperf/index.html new file mode 100644 index 00000000..040ddb63 --- /dev/null +++ b/web/src/vendor/benchmark/example/jsperf/index.html @@ -0,0 +1,287 @@ + + + + + + Benchmark.js test page | jsPerf + + + + + + +
+
+

Benchmark.js test page

+

JavaScript performance comparison

+
+ +

+ Test case created by Mathias + + and last updated +

+ +
+

Info

+

+ This is just a test document for Benchmark.js. +

+
+ +
+

Preparation code

+
<div>Lorem ipsum</div>
<script>
  var arr = [1, 5, 4, 2, 3];

  function init() {
    window.console && console.log('init called');
  }
</script>
<script>
Benchmark.prototype.setup = function() {
  window.foo = 42;
  var x = arr;
};

Benchmark.prototype.teardown = function() {
  window.foo = 24;
};
</script>
+
+ +
+

Preparation code output

+
+
Lorem ipsum
+
+
+ +
+

Test runner

+

+ Warning! For accurate results, please disable Firebug before running the tests. (Why?) +

+

+ Java applet disabled. +

+

+ +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Testing in
TestOps/sec
+
Normal
+
+
x.sort(function(a, b) {
  return a - b;
});
+
+
Exit Early
+
+
x.sort(function(a, b) {
  return a - b;
});
return;
+
+
Async
+
+
// async test
setTimeout(function() {
  deferred.resolve();
}, 10);
+
+
Error
+
+
x.foo(); // unknown method
+
+
Comments
+
+
// comments at start
x.reverse().sort(function(a, b) {
  return a - b;
});
// comments at end
+
+ +

+ You can edit these tests or add even more tests to this page + by appending /edit to the URL. +

+
+ +
+

Compare results of other browsers

+
+
+ +
+

0 comments

+
+
+
+

Add a comment

+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + + -- cgit v1.2.3