appnexus / pyrobuf

A Cython alternative to Google's Python Protobuf library
Other
554 stars 76 forks source link

use bitmaps to track which fields are set instead of bint fields #128

Closed tburmeister closed 5 years ago

tburmeister commented 5 years ago

For a very large message (146 fields) that I tested on, this reduced the in-memory deserialized size by 40%.

tburmeister commented 5 years ago

On a synthetic message with 128 int64 fields, this reduces the size from 2088 bytes to 1088 bytes, or roughly by half.