-
Notifications
You must be signed in to change notification settings - Fork 39
Access to uint64 pair? #214
Comments
I'm -1 on this, because not exposing internal implementation details has allowed us to change the internal representation 3 times so far, with huge benefits each time. What kind of serialization are you doing? I'm curious why a pair of uint64s is significantly better than being able to get a [16]byte. |
Also: numbers? |
Fair enough.
Protobuf.
Because we don't want to spend the cost of converting the uint64 pair to [16]byte on every IP address, if we don't have to. |
This seems like a compiler optimization issue:
|
I'll send a PR for golang/go#42958. I don't know that it'll get accepted, though.
If it doesn't do this already (it might), then the relevant issue is probably golang/go#24416. |
We serialize a lot of IP addresses, and rather than converting the internal uint64 pair to byte arrays and then back to uint64s, it would be great if we could get access to the uint64 pair values directly to use them for serialization. Also, the ability to construct a
netaddr.IP
from a uint64 pair would be useful for de-serialization.The text was updated successfully, but these errors were encountered: