commit | 050c1620a9149fcc1bf84e36d02bb111455e453d | [log] [tgz] |
---|---|---|
author | Ömer Sinan Ağacan <omersa@google.com> | Mon Oct 23 10:51:00 2023 +0200 |
committer | GitHub <noreply@github.com> | Mon Oct 23 10:51:00 2023 +0200 |
tree | 8eebf80bd82405be8c1151a0e523398cefe16121 | |
parent | b2b239b4760edd5a0768d9c6feb653eda1019266 [diff] |
Optimize `CodedBufferWriter._copyInto` to memcpy (#885) dart2wasm currently can't optimize loops into memcpy, however `setRange` methods have type tests to generate `array.copy` (Wasm's `memcpy`). Replacing the loops in `CodedBufferWriter._copyInto` with `setRange` improves an internal benchmark extracted from a real use case significantly in all targets: | | Before | After | Diff | |------------------------------|------------|------------|---------------------| | AOT | 127,587 us | 95,634 us | -31,953 us, -25.0% | | JIT | 106,880 us | 92,800 us | -14,080 us, -13.1% | | dart2js -O4 | 285,587 us | 262,222 us | -23,365 us, -8.1% | | dart2wasm --omit-type-checks | 337,000 us | 236,100 us | -100,900 us, -29.9% |
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 for Dart.
Package | Description | Published Version |
---|---|---|
protobuf | A support library for the generated code | |
protoc_plugin | A Dart back-end for the protoc compiler | |
api_benchmark | Benchmarking for various API calls | |
query_benchmark | Benchmark for encoding and decoding of a “real-world” protobuf |
For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.