Closed anatheka closed 1 month ago
We could use non-cryptographic hash functions. We must somehow ensure, that the target number is in a defined range. Either the hash function can do this or we do it via modulo.
You should use the field numbers 1 through 15 for the most-frequently-set fields. Lower field number values take less space in the wire format. For example, field numbers in the range 1 through 15 take one byte to encode. Field numbers in the range 16 through 2047 take two bytes. You can find out more about this in Protocol Buffer Encoding
(Source: https://protobuf.dev/programming-guides/proto3/#assigning)
Initial try done by #24
We have somehow to ensure, that the field number does not change at each proto file creation. Furthermore, we have to deal with properties that are added in future.