| commit | 11cd8fd41923ae32bcffd7c01dfbed9fcb2b6583 | [log] [tgz] |
|---|---|---|
| author | Ömer Ağacan <omersa@google.com> | Fri May 09 15:42:50 2025 +0100 |
| committer | Ömer Ağacan <omersa@google.com> | Fri May 09 15:42:50 2025 +0100 |
| tree | 6891a9cd4caa48eb86a5fdb40c28cb9307e75380 | |
| parent | 006d3aa9cbf27a8f8925e2eb96bef7754792124a [diff] |
Add sparse enum decoding benchmarks 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).
Protocol Buffers (protobuf) are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.
This repository is home to packages related to protobuf support for Dart.
| Package | Description | Published Version |
|---|---|---|
| protobuf | Runtime library for protocol buffers support. | |
| protoc_plugin | A protobuf protoc compiler plugin used to generate Dart code. | [![pub package] |
| api_benchmark | Benchmarking a number of different api calls. | |
| benchmarks | Benchmarks for various protobuf functions. |
For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.