jamescourtney / FlatSharp

Fast, idiomatic C# implementation of Flatbuffers
Apache License 2.0
511 stars 51 forks source link

Optimize Reads for single-width fields #110

Closed jamescourtney closed 3 years ago

jamescourtney commented 3 years ago

Remove an if statement and a couple of vtable reads from the hot path for single-width vtable fields. Up to ~10% speed improvement depending on scenario. 8 bytes extra memory allocated on deserialized tables. Probably worth it.