/ go Public
cmd/compile: map lookup with result of inlined method cannot use fast path #44898
Feedback is required from experts, contributors, and/or the community before a change can be made.
Given the above type definition, I would expect a map lookup of
x.S()to compile to the same code as a map lookup of
string(x), but it does not.
That is, the following
lookup1function is slower than
lookup2, which it should not be:
Here's the code in a benchmark: https://play.golang.org/p/uw-AHzeos-v
Here are the benchmark results:
The text was updated successfully, but these errors were encountered: