Re:Rkyv is faster than {bincode, capnp, cbor, flatbuffers, p...
by kentonv on Sunday March 14, 2021 @09:19PM
(#26461516)
To be fair, I think FlatBuffers was also designed with game data in mind. But I agree it seems like a great use case to skip schema evolution -- since you can always rebuild all the data files when you change something. You could probably get away with skipping validation, too.
As an aside, I updated the benchmarks yesterday and addressed some other responses that mentioned that the three libraries all have different behavior around validation. That's another place where the three libraries all differ in their approaches and it does materially affect the benchmarks. I found out that Cap'n Proto does validate-on-read, which is is a really cool idea that gives it a big edge while accessing complex structured data that rkyv takes a long time to validate. It's got me thinking about how to get the same kind of validation-on-demand functionality!
(Disclosure: I'm the author of rkyv - thanks for Cap'n Proto, it's been a big influence)