Haha, yeah using TypedArrays to flat pack data structures is so much fun Instead of {a: 6, b: 7, prev: 2, next: 0} we could store it as a quad in a Uint16Array as [6,7,2,0]. Iterating over items is done in jumps of 4. Index at 1, and terminate at 0 and we have minimal GC! :D
I wonder tho: with flat data structures — is it better to index at 0 and use the MAX number as the terminator? Or index at 1 and use the MIN number as the terminator (e.g. 0)? 0x0000 is easy to spot which is quite nice haha.
-
-
Anyway, reusing sequences of bytes that have been allocated ahead of time is probably going to work out real nice for this thing I'm working on :D
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.