mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-04 02:38:50 +00:00
5d63473da8
This CL adds runtime support for unknown fields to be represented as *[]byte in addition to the current representation as []byte. This CL does not change generated code to use *[]byte. Comparison between using *[]byte and []byte: • Every message supports unknown fields, so use of []byte expands a message size by 24B (for 64-bit systems). In contrast, *[]byte only expands a message by 8B. This has significant memory implications for small messages. • If unknown fields are encountered, *[]byte has extra overhead allocating the 24B slice header. However, it is assumed that messages rarely see any unknown fields at runtime, or generally do so for a temporary period of time. Change-Id: I81935e4ea7394166e61ff4579f76f59fa792dfc9 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/244937 Reviewed-by: Damien Neil <dneil@google.com> |
||
---|---|---|
.. | ||
api_export.go | ||
checkinit.go | ||
codec_extension.go | ||
codec_field.go | ||
codec_gen.go | ||
codec_map_go111.go | ||
codec_map_go112.go | ||
codec_map.go | ||
codec_message.go | ||
codec_messageset.go | ||
codec_reflect.go | ||
codec_tables.go | ||
codec_unsafe.go | ||
convert_list.go | ||
convert_map.go | ||
convert.go | ||
decode.go | ||
encode.go | ||
enum_test.go | ||
enum.go | ||
extension_test.go | ||
extension.go | ||
lazy_test.go | ||
legacy_aberrant_test.go | ||
legacy_enum.go | ||
legacy_export_test.go | ||
legacy_export.go | ||
legacy_extension.go | ||
legacy_file_test.go | ||
legacy_file.go | ||
legacy_message.go | ||
legacy_test.go | ||
merge_gen.go | ||
merge.go | ||
message_reflect_field.go | ||
message_reflect_gen.go | ||
message_reflect_test.go | ||
message_reflect.go | ||
message.go | ||
pointer_reflect.go | ||
pointer_unsafe.go | ||
validate.go | ||
weak.go |