What?
This test compares two different methods of retrieving the first element from a jQuery set:
$('tag:first')
$('tag').eq(0)
How to use
There are three customisable variables for the test.
- Max # elements
- This is the maximum number of elements that will be added into our document for matching.
- # elements per step
- The number of elements to add per step. The lower this number, the more fidelity you will see in the graph, but the longer it will take.
- Iterations
- The number of times to test each selector against the current set. The higher this number, the more outliers will be evened out, but the longer it will take.
Adjust accordingly below and press Go.
Oh, and if you're using Internet Explorer, piss off.