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
Needed to generate several millions of VINs and this algorith was not performing so I made a very simple tweak:
extracted calls to _.keys and saved as variable i.e.
var vinGenerator = require(__dirname + '/vin-generator');
console.time("save");
for (i = 0; i < 10000; i++) {
var randomVin = vinGenerator.generateVin();
}
console.timeEnd("save");
Before change it too 89548.187ms to execute and after in 103.560ms
The text was updated successfully, but these errors were encountered:
Needed to generate several millions of VINs and this algorith was not performing so I made a very simple tweak:
extracted calls to _.keys and saved as variable i.e.
Used something like this to test:
Before change it too 89548.187ms to execute and after in 103.560ms
The text was updated successfully, but these errors were encountered: