asm_js_zlib_bench

JavaScript performance comparison

Test case created by ukyo and last updated

Preparation code

<script src="//rawgithub.com/ukyo/5218812/raw/1540fdcb668f3ef3bbda6076250751109b996946/zpipe_asm.js"></script>
<script src="//rawgithub.com/ukyo/zpipe/master/dist/zpipe.js"></script>
<script>
(function() {
  var bytes = new Uint8Array(1000000);
  var a = zpipe_asm.rawDeflate(bytes, true);
  var b = zpipe_asm.rawInflate(a, true);
  if (bytes.length !== b.length) throw new Error('zpipe_asm');

  var bytes = new Uint8Array(1000000);
  var a = zpipe.rawDeflate(bytes, true);
  var b = zpipe.rawInflate(a, true);
  if (bytes.length !== b.length) throw new Error('zpipe');
}());
</script>
<script>
Benchmark.prototype.setup = function() {
    var zpipe = window.zpipe;
    var zpipe_asm = window.zpipe_asm;
    var bytes = new Uint8Array(1000000);
};
</script>

Preparation code output

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
asm
var a = zpipe_asm.rawDeflate(bytes, true);
var b = zpipe_asm.rawInflate(a, true);
pending…
normal
var a = zpipe.rawDeflate(bytes, true);
var b = zpipe.rawInflate(a, true);
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment