diff options
author | Ayush Ranjan <ayushranjan@google.com> | 2021-11-08 00:38:28 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-11-08 00:46:16 -0800 |
commit | 510bad19b6a71aec63b351e24b08cf6596c871b3 (patch) | |
tree | 003a98cfbb819902337c4074c7ea3333f21dc84a /pkg/tcpip/link/qdisc/fifo/endpoint.go | |
parent | 4622e17bccc7c40a2698e8314d29bbde87090cec (diff) |
Use faster marshalling method for non primitive struct fields.
In autogenerating the implementation of Marshallable.MarshalBytes(), we were
using the slower MarshalBytes(). Instead use MarshalUnsafe which is faster and
falls back to slow MarshalBytes() if the type is not packed.
Even if the outer struct is not packed, we can at least do fast marshalling on
its packed fields.
PiperOrigin-RevId: 408268469
Diffstat (limited to 'pkg/tcpip/link/qdisc/fifo/endpoint.go')
0 files changed, 0 insertions, 0 deletions