runtime,cmd/compile: redesign PCDATA encoding #61984
Labels
binary-size
compiler/runtime
Issues related to the Go compiler and/or runtime.
FeatureRequest
NeedsFix
The path to resolution is known, but the work has not been done.
Performance
Milestone
I've been experimenting with alternate encodings for the PCDATA tables, with the goal of significantly improving decode speed, at possibly a slight increase in binary size.
@mknyszek, @dr2chase and I designed a format that's >4x faster to decode than the Go 1.21 tables, while increasing binary size by only 1–2.5%. This issue is to track (eventually) moving to this format in the compiler and runtime.
I've described the format here and have an out-of-tree implementation of the encoder and decoder (apologies for the messy, experimental code).
Here's an example benchmark, using the
go
binary:All of the benchmarks generate a random sample of 1024 (PC, table) pairs to lookup and report the average lookup time.
"Decode/go/alt" is the new implementation. "varint-cache-nohit" is the current varint format, with no cache hits. "varint-cache-hit" is similar, but repeats each lookup 8 times to simulate a high cache hit rate. "varint-cache-none" is the varint format, but with no cache.
Here are the same results for github.com/kubernetes/kubernetes/cmd/kubelet:
The text was updated successfully, but these errors were encountered: