Is there any way to compare execution time of two methods?
For example I wonder which method is faster: querySelector() or getElementById(). Theoretically, I guess, time should be the same. But what if i want to check it in practice? Is any way to execute first method and check how much time it took, next doing the same with second method, and then to compare two results?
Aucun commentaire:
Enregistrer un commentaire