You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: fix accidentally undone Go map[string(byteslice)] lookup optimization
This change brings back an optimization that go innocently removed
while trying to reduce the number of invocations to node.GetKey()
in PR cosmos#890.
The Go compiler considers the special case of lookups per:
value, ok := map[string(byteslice)]
or
value := map[string(byteslice)]
and performs a zero byteslice->string conversion because it knows
that there is no storing in the map hence a read-only usage of
the byteslice's memory.
0 commit comments