<!DOCTYPE html> | |
<body> | |
<script src="../resources/runner.js"></script> | |
<script> | |
var length = 1000000; | |
var source = new Uint8Array(length); | |
for (var i = 0; i < length; i++) | |
source[i] = i; | |
var target = new Float64Array(length); | |
PerfTestRunner.measureRunsPerSecond({ | |
description: "Measures performance of setting a Float64Array to a Uint8Array using Float64Array.prototype.set.", | |
run: function() { | |
target.set(source); | |
} | |
}); | |
</script> | |
</body> |