techfort / PowerArray

Boosted Performance Array
247 stars 16 forks source link

How to use as default #14

Closed zoomclub closed 9 years ago

zoomclub commented 9 years ago

This looks good but my question has always been, how does one use a faster array when parsing a JSON file? Much of my structures using arrays are defined in JSON, so how do I have powerarrays come out of the deserializer instead of the native arrays? I must get this question answered so I can feel like I actually know something better :)

techfort commented 9 years ago

PowerArray constructor takes a native array (i.e. var a = new PowerArray(yourArrayOfJsonObjects)) Make sure to utilize correct sorting so to benefit from PowerArray.binarySearch