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
I have the strange behaviour that the first test will run faster than all the other.
Version: 3.0.0
Node: 16.17.0
constBenchmarkify=require("benchmarkify");constbenchmark=newBenchmarkify("Simple example").printHeader();constsuite=benchmark.createSuite("String Concatenation");letage=15;suite.setup(()=>age=21).add('add ref',function(){return"Whiskey has an Age of "+age+" years.";}).ref('add',function(){return"Whiskey has an Age of "+age+" years.";}).add('join',function(){return["Whiskey has an Age of",age,"years."].join(" ");}).add('concat',function(){return"Whiskey has an Age of ".concat(age).concat(" years.");}).add('interpolate',function(){return`Whiskey has an Age of ${age} years.`}).run();
Where you can see that add ref, although being the same as add, is twice as fast. Same happens if I move any other test on top, the first run runs significantly faster than the rest. Any Suggestions?
The text was updated successfully, but these errors were encountered:
I have the strange behaviour that the first test will run faster than all the other.
Version: 3.0.0
Node: 16.17.0
And the Response:
Where you can see that
add ref
, although being the same asadd
, is twice as fast. Same happens if I move any other test on top, the first run runs significantly faster than the rest. Any Suggestions?The text was updated successfully, but these errors were encountered: