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
What version of protobuf and what language are you using?
Version: master
Language: C#
What operating system (Linux, Windows, ...) and version?
Linux, Windows
What runtime / compiler are you using (e.g., python version or gcc version)
MSBUILD 15
bool, double and float should be marked as fixed size. In FieldCodec.cs we create the codecs used by RepeatedField.cs. Having these not be fixed means that on large repeated fields for these fixed length primitives, we will call the size calculator each time, for every single data point (inside CalculatePackedDataSize). I've seen about 40% serialization improvement on repeated fields for these types when they are marked as fixed.
Straight forward fix is to rename ComputeBoolSize to ComputeFixedBoolSize, ComputeFloatSize to ComputeFixedFloatSize and ComputeDoubleSize to ComputeFixedDoubleSize, then we should change ForBool, ForFloat and ForDouble to send in a dummy value to the computesize functions when creating the codec (we will set the FixedSize attribute to the result).
The text was updated successfully, but these errors were encountered:
@jtattermusch - Had a quick read through. Sounds exciting. I looked over the pull request for the benchmark code the other day and I'm looking forward to its release.
What version of protobuf and what language are you using?
Version: master
Language: C#
What operating system (Linux, Windows, ...) and version?
Linux, Windows
What runtime / compiler are you using (e.g., python version or gcc version)
MSBUILD 15
bool, double and float should be marked as fixed size. In FieldCodec.cs we create the codecs used by RepeatedField.cs. Having these not be fixed means that on large repeated fields for these fixed length primitives, we will call the size calculator each time, for every single data point (inside CalculatePackedDataSize). I've seen about 40% serialization improvement on repeated fields for these types when they are marked as fixed.
Straight forward fix is to rename ComputeBoolSize to ComputeFixedBoolSize, ComputeFloatSize to ComputeFixedFloatSize and ComputeDoubleSize to ComputeFixedDoubleSize, then we should change ForBool, ForFloat and ForDouble to send in a dummy value to the computesize functions when creating the codec (we will set the FixedSize attribute to the result).
The text was updated successfully, but these errors were encountered: