lodash last (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="
https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js
"></script>

Setup

const data = [...Array(10000).keys()].map(index => ({ index }))

Test runner

Ready to run.

Testing in
TestOps/sec
lodash last
_.get(_.last(data), 'index')
ready
index
data[data.length - 1].index
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.