2 Months Ago
Improve SortedPairs even more (#2032) * Improve SortedPairs even more pr #2015 is good, but we can make it much better. improvments: table.insert( tbl, val ) > tbl[ #tbl + 1 ] = val next( keys, i ) > keys [ i ] benchmarks: brandonsturgeon's version is 10.57% better then default. my version is 35.87% better then default or 28.29% better then brandonsturgeon's. bench src: https://gist.github.com/Be1zebub/4b90791fc7ab2d89a18c7a93da143095 * Update table.lua not very significant, but why not + 2-5% more perf (compared to the improved version)