diff options
author | Jon Skeet <skeet@pobox.com> | 2015-06-12 13:07:51 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2015-06-12 13:07:51 +0100 |
commit | 7532f0256f58e0d11711da4e159534bccbf266f0 (patch) | |
tree | 246de5832a971caff8dcf85db1f971aed2c48f3c /README.md | |
parent | 5a33827eec75b980fb152c531e4c6b75ce5af015 (diff) | |
download | protobuf-7532f0256f58e0d11711da4e159534bccbf266f0.tar.gz protobuf-7532f0256f58e0d11711da4e159534bccbf266f0.tar.bz2 protobuf-7532f0256f58e0d11711da4e159534bccbf266f0.zip |
Reimplement RepeatedField<T> using an array as the backing store.
This is effectively reimplementing List<T>, but with a few advantages:
- We know that an empty repeated field is common, so don't allocate an array until we need to
- With direct access to the array, we can easily convert enum values to int without boxing
- We can relax the restrictions over what happens if the repeated field is modified while iterating, avoiding so much checking
This is somewhat risky, in that reimplementing a building block like this is *always* risky, but hey...
(The performance benefits are significant...)
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions