0

Which is faster?

arr.contains(val);

or

$.inArray(val, arr);

is there an accurate way to test?

Upworks
  • 267
  • 2
  • 15
  • @Adriano - its an ember function [Ember contains() doc](http://docs.emberjs.com/symbols/Ember.Enumerable.html#method=.contains) – Upworks Jun 07 '12 at 20:43

1 Answers1

4

If you're looking for an easy way to benchmark JS, I'd suggest jsperf.com.

ebryn
  • 4,407
  • 1
  • 23
  • 21