node-lodash-find-perf

Results

Data Set _.keyBy _.find
10 / 100 0.524ms 0.417ms
10 / 1000 0.04ms 0.027ms
10 / 10000 0.007ms 0.019ms
100 / 100 0.027ms 2.199ms
100 / 1000 0.52ms 2.251ms
100 / 10000 0.027ms 1.027ms
1000 / 100 0.212ms 17.885ms
1000 / 1000 0.161ms 8.984ms
1000 / 10000 0.134ms 2.3ms
1000 / 1000000 0.159ms 1.442ms
10000 / 1000000 2.363ms 29.226ms
100000 / 1000000 27.336ms 9054.86ms
-----------------------------------
Test: (source: 10, array: 100)
-----------------------------------
_.keyBy:   0.524ms
_.find:    0.417ms
| 10 / 100 | 0.524ms | 0.417ms |
-----------------------------------
Test: (source: 10, array: 1000)
-----------------------------------
_.keyBy:   0.04ms
_.find:    0.027ms
| 10 / 1000 | 0.04ms | 0.027ms |
-----------------------------------
Test: (source: 10, array: 10000)
-----------------------------------
_.keyBy:   0.007ms
_.find:    0.019ms
| 10 / 10000 | 0.007ms | 0.019ms |
-----------------------------------
Test: (source: 100, array: 100)
-----------------------------------
_.keyBy:   0.027ms
_.find:    2.199ms
| 100 / 100 | 0.027ms | 2.199ms |
-----------------------------------
Test: (source: 100, array: 1000)
-----------------------------------
_.keyBy:   0.52ms
_.find:    2.251ms
| 100 / 1000 | 0.52ms | 2.251ms |
-----------------------------------
Test: (source: 100, array: 10000)
-----------------------------------
_.keyBy:   0.027ms
_.find:    1.027ms
| 100 / 10000 | 0.027ms | 1.027ms |
-----------------------------------
Test: (source: 1000, array: 100)
-----------------------------------
_.keyBy:   0.212ms
_.find:    17.885ms
| 1000 / 100 | 0.212ms | 17.885ms |
-----------------------------------
Test: (source: 1000, array: 1000)
-----------------------------------
_.keyBy:   0.161ms
_.find:    8.984ms
| 1000 / 1000 | 0.161ms | 8.984ms |
-----------------------------------
Test: (source: 1000, array: 10000)
-----------------------------------
_.keyBy:   0.134ms
_.find:    2.3ms
| 1000 / 10000 | 0.134ms | 2.3ms |
-----------------------------------
Test: (source: 1000, array: 1000000)
-----------------------------------
_.keyBy:   0.159ms
_.find:    1.442ms
| 1000 / 1000000 | 0.159ms | 1.442ms |
-----------------------------------
Test: (source: 10000, array: 1000000)
-----------------------------------
_.keyBy:   2.363ms
_.find:    29.226ms
| 10000 / 1000000 | 2.363ms | 29.226ms |
-----------------------------------
Test: (source: 100000, array: 1000000)
-----------------------------------
_.keyBy:   27.336ms
_.find:    9054.86ms
| 100000 / 1000000 | 27.336ms | 9054.86ms |