compiler/runtimeIssues related to the Go compiler and/or runtime.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Performance
These lines are directly inlined in 1.18 (there may be a mistake in this expression, forgive me for not being familiar with the principles of assembly).
This was caused by https://go-review.googlesource.com/c/go/+/395854 . It was a deliberate change to avoid inlining in cases where we were running into bugs.
I think we will leave this as is for 1.19. unified IR should fix this for 1.20.
compiler/runtimeIssues related to the Go compiler and/or runtime.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Performance
7 participants
You can’t perform that action at this time.
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.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
It reproduces on the 1.19
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
playground: https://go.dev/play/p/6UxOn6pftVs
main_test.go
What did you expect to see?
1.19 should be similar to the 1.18 benchmark test, not much slower.
What did you see instead?
goversion: 1.19
goversion: 1.18
The assembly generated by 1.19 is found to have more
main..dict.add[int](SB), AX
main..dict.add[string](SB), AX
These lines are directly inlined in 1.18 (there may be a mistake in this expression, forgive me for not being familiar with the principles of assembly).
/cc @ianlancetaylor
The text was updated successfully, but these errors were encountered: