Answer the question
In order to leave comments, you need to log in
How to check code execution speed?
Hello. Recently, I have been thinking more and more about the speed of my code.
Perhaps you can tell me some utilities for this or what do you use when measuring the speed of your code?
Thanks for the replies.
Answer the question
In order to leave comments, you need to log in
If you are interested in a specific node, you can use performance.now :
var t0 = performance.now();
doSomething();
var t1 = performance.now();
console.log("Call to doSomething took " + (t1 - t0) + " milliseconds.");
var t0 = performance.now();
var t1;
doSomething().then(result => {
t1 = performance.now();
console.log("Call to doSomething took " + (t1 - t0) + " milliseconds.");
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question