2 ms·
> These are binary formats, so loading a record is usually a matter of just copying (blitting) a range of bytes from disk to memory, where you end up with a C d
by gavinpc 10y ago
> These are binary formats, so loading a record is usually a matter of just copying (blitting) a range of bytes from disk to memory, where you end up with a C data structure you can use. There’s no lexing or parsing involved in loading a file. Lexing and parsing are orders of magnitude slower than blitting.
Yeah, well that was eight years ago. There's no way that, immediately below this item on Hacker News would be another item boasting that
> Cap’n Proto is INFINITY TIMES faster than Protocol Buffers. This benchmark is, of course, unfair. It is only measuring the time to encode and decode a message in memory. Cap’n Proto gets a perfect score because there is no encoding/decoding step. The Cap’n Proto encoding is appropriate both as a data interchange format and an in-memory representation, so once your structure is built, you can simply write the bytes straight out to disk!
- venning 10y agoI'm sure that's why this article is listed here today. This comment on Cap'n Proto came one hour before this article was re-submitted: https://news.ycombinator.com/item?id=12471541 https://news.ycombinator.com/item?id=12471541