Home

What is oheap?

2017-01-07

protobuf: we have an in-memory format, and a network format, and a bijection between them (encoder/decoder pair)

capnproto: no decoding step (roughly, there is a zero compression step). We just use the in-memory format as the network format.

oheap: no decoding step. We just use the little-endian network format as the in-memory format. All we need to do is decode 3-byte integers like this:

a[0] + a[1] << 8 + a[2] << 16. TODO: See the code.

Show the osh.asdl.h or arith.asdl.h code.

References:

Two reasons. To interface Python and C++ with code as small as possible:

Python's ASDL generates an incredible 10,000 lines of code from of ASDL. This is because language bindings are very verbose.

It's actually easier to, and . People get hung up on APIs with "type safety" as opposed to serialization formats, but you're not getting that much with C and Python. Once the serialization format is tested, it's basically "free".

Optimizations

Locality: LLVM Video -- small size optimization

Saving pointer size:

Knuth: pointers.


Discuss this post on Reddit