You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With upcoming change we'll improve decoding performance of enums, but
there will be a difference between "sparse" and "dense" enum decoding
performance, even though they'll both be faster.
To be able to measure the difference add a "sparse" enum type and a
benchmark for decoding it.
"Sparse" means the enum has large gaps between known enum values, or
negative enum values.
When decoding this kind of enums, the mapping from the wire `varint` to
the Dart value for the enum needs to be done by binary search, map
lookup, or similar.
For "dense" enums, we can have a list of enum values and index the list
directly with the `varint` value, after a range check.
These changes will be done in the follow-up PR(s).
0 commit comments