3 ms·
They are missing the second major reason why flatbuffers is awesome, cache locality. It's incredibly hard to layout objects in memory with Java but if you don'
by vvanders 11y ago
They are missing the second major reason why flatbuffers is awesome, cache locality.
It's incredibly hard to layout objects in memory with Java but if you don't mind the lookup hit on bytebuffers flatbuffers is a great way to structure data in the patterns you access it.
All this stuff is pretty old-hat to game dev people bit it's nice to see mainstream dev start caring a bit more about performance.
- white-flame 11y agoIn general, objects allocated in sequence will be consecutive in Eden. After GC moves stuff around, objects referred to by object X often follow object X itself. YMMV.
- Aardappel 11y agoGood point. Lookup in Java is a bit slower than in the language FlatBuffers was originally designed for (C++), but being able to bypass Java's object allocation may well make up for that.