1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Added prepareOnce to performance test.

This commit is contained in:
kkapsner 2018-06-30 15:16:10 +02:00
parent 4d71d6bc02
commit 9f38703e84

View File

@ -32,9 +32,14 @@ var performTest = function(){
var min = Number.POSITIVE_INFINITY;
var max = 0;
var outerI = 0;
if (func.prepareOnce){
func.prepareOnce();
}
function run(){
for (var i = 0; i < innerRunLength; i += 1){
func.prepare();
if (func.prepare){
func.prepare();
}
var start = performance.now();
func.test();
var end = performance.now();