Closed joshuahhh closed 5 years ago
Awesome, I will review and test this shortly! Thanks for the contribution!
Hey, I'm the guy who pushed #8 and made that code obsolete. Yeah, this totally makes sense. My initial push intentionally didn't change any code beyond maptype.ts -- I was changing enough in @IjzerenHein 's code already so preserved the code that called into createMap()
. Since that change has been accepted, this cleanup makes perfect sense. :+1:
The old map used an associative array internally, and the supplied compare
function was used to sort items such that lookups were O(log N). The new one uses a non-sorted array and an index map for O(1) lookups. compare
therefore isn't needed.
Thanks for taking a look, @adamhaile! (And for #8 too.)
How do you think this looks, @IjzerenHein?
Per #9. Thanks!