-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgofuse: don't inline lookup tables / alloc once
Truthfully, I didn't benchmark this or look at the assembly. But I remember this pattern being a concern in the past. Unless the compiler has changed to optimize this out, things like the map literal would be initialized each call. Now we should do that only once on init. Metrics would be nice to see on this though. Does the compiler actually still act that way, and does the stack climbing cost us more than doing that anyway? Should these be lazy and initialized on the first call rather than at init time?
- Loading branch information
Showing
1 changed file
with
34 additions
and
28 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