You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
What about automatically adding a fastest and slowest property here when a suite completes? They would have the same value as calling suite.filter('slowest'). Then, instead of something like this:
varfastest=suite.filter('fastest'),slowest=suite.filter('slowest'),if(fastest.length>1){console.log('It\'s too close to call.');}else{console.log(fastest[0].name+' was fastest');}
One could simply write this:
if(suite.fastest>1){console.log('It\'s too close to call.');}else{console.log(suite.fastest[0].name+' was fastest');}
The current filter behavior could be kept for backward compatibility or it could be changed into a normal special case free filter?
What do you think? I can submit a pull request.
The text was updated successfully, but these errors were encountered:
I must say I find it quite odd how Benchmark.js handles finding the slowest and fastest benchmark by hard coding named callbacks into it's filter method.
What about automatically adding a
fastest
andslowest
property here when a suite completes? They would have the same value as callingsuite.filter('slowest')
. Then, instead of something like this:One could simply write this:
The current filter behavior could be kept for backward compatibility or it could be changed into a normal special case free filter?
What do you think? I can submit a pull request.
The text was updated successfully, but these errors were encountered: