cmd/compile: PGO devirtualization of generic method call #68787
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
Please see example at https://github.com/bboreham/go-loser/tree/lesser.
I would like the call to
Less()
to be devirtualized and inlined, because the implementation is trivial.A version of the code using
<
instead of aLess
method is here; it runs about 40% faster.Commands I ran in my attempt:
(
go version go1.23rc2 linux/amd64
)I tried to gain some insight via
-gcflags=-d=pgodebug=2
, I but don't really follow what it is telling me.[This is something I was chatting with @prattmic about at GopherCon 2023; I just got round to writing it up]
The text was updated successfully, but these errors were encountered: