Tests:
  • find

    x
     
    var __POSTS = [ 
        { id: 1, title: 'Apple', description: 'Description of post 1' }, 
        { id: 2, title: 'Orange', description: 'Description of post 2' }, 
        { id: 3, title: 'Guava', description: 'Description of post 3' }, 
        { id: 4, title: 'Banana', description: 'Description of post 4' }
    ];
    var __FOUND = __POSTS.find(function(post, index) {
        if(post.title == 'Guava')
            return true;
    });
  • findIndex

     
    var __POSTS = [ 
        { id: 1, title: 'Apple', description: 'Description of post 1' }, 
        { id: 2, title: 'Orange', description: 'Description of post 2' }, 
        { id: 3, title: 'Guava', description: 'Description of post 3' }, 
        { id: 4, title: 'Banana', description: 'Description of post 4' }
    ];
    var __FOUND = __POSTS.findIndex(function(post, index) {
        if(post.title == 'Guava')
            return true;
    });
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    find
    findIndex

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36
Chrome 95 on Linux
View result in a separate tab
Test name Executions per second
find 57806616.0 Ops/sec
findIndex 56391564.0 Ops/sec