commit | 767ce8152ab2b56d1f9bb3554f0e5f9552cc15d2 | [log] [tgz] |
---|---|---|
author | Loren Van Spronsen <lorenvs@outlook.com> | Sat Apr 23 09:21:12 2022 -0700 |
committer | GitHub <noreply@github.com> | Sat Apr 23 18:21:12 2022 +0200 |
tree | 430b133d9425832078bfcede9da385765c6c1add | |
parent | 99bc5416c89e59f2b196dbf54910060b67ab533f [diff] |
Remove fold() closures from `FieldSet._hashCode`. (#554) The fold() calls come with significant runtime cost, and make it more difficult to hoist accesses to commonly used variables. Just rewriting this pattern shows a significant performance improvement for both JS and VM benchmarks. Baseline ``` JS HashCode(RunTime): 9833.333333333334 us. HashCode(RunTime): 9891.625615763547 us. HashCode(RunTime): 9607.655502392345 us. HashCode(RunTime): 9661.835748792271 us. HashCode(RunTime): 9765.853658536585 us. VM HashCode(RunTime): 4527.384615384615 us. HashCode(RunTime): 4534.151583710407 us. HashCode(RunTime): 4546.556818181818 us. HashCode(RunTime): 4490.65470852017 ``` Results ``` JS HashCode(RunTime): 8004 us. HashCode(RunTime): 7980.0796812749 us. HashCode(RunTime): 7976.095617529881 us. HashCode(RunTime): 7824.21875 us. HashCode(RunTime): 7847.058823529412 us. VM HashCode(RunTime): 2474.5451174289246 us. HashCode(RunTime): 2533.7037974683544 us. HashCode(RunTime): 2532.4556962025317 us. HashCode(RunTime): 2420.072551390568 us. HashCode(RunTime): 2521.3198992443326 ``` Co-authored-by: Loren Van Spronsen <lorenvs@google.com>
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. It contains: