HTML Preparation code:
x
 
1
2
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
 
var text = "1KX5 P/CKD TORTELLINI BRAIS BEEF CA CT 631 ***** note: we don't sell this. *****";
Tests:
  • IndexOf

     
    text.indexOf('note') !== 1
  • Includes

     
    text.includes('note')
  • lodash

     
    _.includes(text, 'note')
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    IndexOf
    Includes
    lodash

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:131.0) Gecko/20100101 Firefox/131.0
Firefox 131 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
IndexOf 1562450816.0 Ops/sec
Includes 1558164736.0 Ops/sec
lodash 35513388.0 Ops/sec