Blue: lsearch_1() Red: lsearch_2() (2) NESTS = 400 N = 5000000 N = 10000000 N = 15000000 N = 20000000 lsearch_1() 748000 ms, 764000 ms, 748000 ms, 1512000 ms, 1548000 ms, 1556000 ms, 2424000 ms, 2412000 ms, 2372000 ms 3196000 ms, 3200000 ms, 3176000 ms Average Time 753333.33 ms 1538666.67 ms 2402666.67 ms 3190666.67 ms lsearch_2() Average Time Slope(0,N1) Slope(N1,N2) Slope(N2,N3) Slope(N3,N4) Average Slope 0.1496 0.1528 0.1824 0.1544 0.1598 N = 5000000 N = 10000000 N = 15000000 N = 20000000 508000 ms, 520000 ms, 540000 ms, 1060000 ms, 1092000 ms, 1100000 ms 1684000 ms, 1692000 ms, 1668000 ms 2240000 ms, 2252000 ms, 2276000 ms, 522666.67 ms 1084000 ms 1681333.33 ms 2256000 ms NESTS = 400 Slope(0,N1) Slope(N1,N2) Slope(N2,N3) Slope(N3,N4) Average Slope 0.1496 0.1104 0.1248 0.1112 0.124 Average Slope(1) / Average Slope(2) = 128.9%. As the y-axis stands for running time, the higher slope, the less eļ¬cient the algorithm is. So lsearch_2() function is 28.9% faster than lsearch_1() when it comes to run time.