Remix.run Logo
▲ Skwid 2 hours ago

One of my favourite yak shaving adventures in a previous job was writing a parse in place UBJSON decoder for ~1MB of data on a device with about as much free memory. Fast (enough) access by key, binary search with a few shortcuts for the mostly numeric payload. It built an index of maybe 30 bytes to speed things along, but also to let it keep working on the tail of the old message whilst the new one was overwriting it's start.

Should the system design have required all this of a device with 4MB of memory? Probably not. But it worked, and I had a great time