Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Chrome 56
Windows 7
Other
7 years ago
Test name Executions per second
body.contains(); direct; notIns 2600026.0 Ops/sec
body.contains(); nested; notIns 2634836.0 Ops/sec
body.contains(); direct; ins 2579353.0 Ops/sec
body.contains(); nested; ins 2574464.0 Ops/sec
own function; direct; notIns 3618504.0 Ops/sec
own function; nested; notIns 1767283.0 Ops/sec
own function; direct; ins 2546187.0 Ops/sec
own function; nested; ins 1499365.0 Ops/sec
Script Preparation code:
Tests:
  • body.contains(); direct; notIns

  • body.contains(); nested; notIns

  • body.contains(); direct; ins

  • body.contains(); nested; ins

  • own function; direct; notIns

  • own function; nested; notIns

  • own function; direct; ins

  • own function; nested; ins