@dmitshur hello，I want to get the value of runtime.MEMstats.Lookups in the latest version 1.19, but It's always going to be 0. I see that in the 1.11 submission history, someone changed this, and in the end, lookups was discarded, but the reason is not explained clearly.I want to know the reason for the abandonment
@ZekeLu I looked at the submission information, but I couldn't see the fundamental reason why the lookups count was dropped, perhaps because the statistic itself doesn't mean much.The field is still there for downward compatibility
@mknyszek Is this something you're familiar with? The issue here seems to be that the MemStats.Lookups is never populated on tip, and its internal comment on mstats.nlookup says it's unused. However, the publicly visible comment doesn't indicate that it's deprecated or unused, just that it's "useful for debugging runtime internals".
Does the documentation need to be updated, or is its current description fine and this is working as intended?
What Michael said is correct, the documentation is just out of date. As for why it was set to zero, one reason why might be that this needs to be tracked on a very hot path in the runtime, so it's a cost everyone would pay for.