Test case name | Result |
---|---|
$.hasClass | |
RegExp | |
Dry RegExp | |
indexOf | |
classList | |
hasClassString | |
RegExp 2 | |
RegExp 3 | |
RegExp 4 | |
RegExp 5 | |
indexOf simplest |
Test name | Executions per second |
---|---|
$.hasClass | 506538.8 Ops/sec |
RegExp | 723947.7 Ops/sec |
Dry RegExp | 348754.1 Ops/sec |
indexOf | 1679394.6 Ops/sec |
classList | 1998981.9 Ops/sec |
hasClassString | 1002785.7 Ops/sec |
RegExp 2 | 1199511.9 Ops/sec |
RegExp 3 | 871022.4 Ops/sec |
RegExp 4 | 1015889.2 Ops/sec |
RegExp 5 | 1092445.0 Ops/sec |
indexOf simplest | 3336766.8 Ops/sec |