Commit ff29f974 authored by Cherry Zhang's avatar Cherry Zhang
Browse files

[dev.link] cmd/internal/goobj2: change StringRef encoding for better locality

Previously, StringRef is encoded as an offset pointing to
{ len, [len]byte }. This CL changes it to { len, offset }, where
offset points the bytes.

With the new format, reading a string header is just reading two
adjacent uint32s, without accessing the string table. This should
improve locality of object file reading.

Change-Id: Iec30708f9d9adb2f0242db6c4767c0f8e730f4df
Reviewed-on: https://go-review.googlesource.com/c/go/+/226797


Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: default avatarJeremy Faller <jeremy@golang.org>
Reviewed-by: default avatarThan McIntosh <thanm@google.com>
parent 4ec5e7c5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment