Package to test Javascript's performance?

Hi guys! I was looking for a package or something similar that will help me to test the performance of my code.
Example: I’m creating a helper that checks if an element is inside an array.There are different ways to do this, how can i test the various performances?
Thanks to everyone :relaxed:

For the browser you can use the Chrome Dev Tools (Profiler, Timeline) and for node.js you can use https://github.com/node-inspector/v8-profiler with node-inspector.

For your example it is helpful to know about the common search algorithms and how they behave. This blog post for example gives a short summary: http://www.bradoncode.com/blog/2012/04/big-o-algorithm-examples-in-javascript.html.
With that knowledge you will also know that it doesn’t matter for short lists.

Inside the Timeline there are a lot of features, but i’m sure that with a little of practice i can filter the useful ones.
I’ll let you know if i’ll face issues, thanks Sanjo!