-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unicode/norm: lazy load recompMap from string
recompMap gets populated on init, which requires 21kB of memory. Instead populate it only when we need it. This will put it in the rodata section of the binary, which means that the Go compiler can apply better optimizations to it. The string is an alternating series of 4 byte keys and 4 byte values, which get built into a map the first time they are required. Updates golang/go#26752. Change-Id: I4f9b7d74af6df42b58999cf42cf5ada9646aa98d Reviewed-on: https://go-review.googlesource.com/127926 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
- Loading branch information
1 parent
cb67308
commit 2378460
Showing
4 changed files
with
1,921 additions
and
1,889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.