Skip to content

Commit

Permalink
fix sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
m committed Jul 29, 2017
1 parent d8dde40 commit 807221b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/bench-ejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function fill(s, l) { s=String(s); return s + sp.slice(0,l-s.length); }
function fillR(s, l) { s=String(s); return sp.slice(0,l-s.length)+s; }

function log(name, runTimes, totalLoops) {
runTimes = runTimes.sort();
runTimes = runTimes.sort(function(a,b) { return a-b; });
var m = Math.trunc(runs/2);
var m2 = (runs % 2 == 0) ? m-1 : m;
var med1 = Math.round((runTimes[m]+runTimes[m2])/2);
Expand Down

0 comments on commit 807221b

Please sign in to comment.