Files
flatbuffers/include/flatbuffers
Wouter van Oortmerssen 79b80f84df Reduced FlatBufferBuilder from 3 buffers to 1
Previously, FlatBufferBuilder used 3 resizable buffers:
- serialization (vector_downward)
- field offsets (std::vector)
- vtable offsets (std::vector)

Since the serialization buffer grows downwards, the bottom part of
it can be used as a "scratchpad" storage for the other two. Since
field offsets are only accumulated during table construction, and
vtable offsets only after table construction, the two can trivially
share the same storage.

Not only does this reduce the amount of allocation, it also removes
the bulk of std::vector usage from FlatBufferBuilder which was
the #1 cause of slow-down in debug mode, see e.g.:
https://stackoverflow.com/questions/36085285/any-way-to-improve-flatbuffer-performance-in-debug-c-msvc

Change-Id: I0224cf2f2a863d2d7ef762bc9163b52fdc149522
Tested: on Linux.
2018-01-11 11:13:23 -08:00
..
2017-12-21 11:45:02 -08:00
2017-12-21 11:45:02 -08:00
2017-12-21 11:45:02 -08:00
2017-12-21 11:45:02 -08:00
2018-01-04 10:01:41 -08:00
2017-12-21 11:45:02 -08:00
2018-01-04 09:09:09 -08:00