Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: performance regression on append-like loop #19633
Consider the following benchmark:
Comparing tip (
A pretty bad regression.
Tried on two machines, one Linux desktop and one Mac laptop, the regression I saw is much smaller
So this is probably very processor-dependent?
Assembly for tip:
Assembly for Go 1.8:
Seems the only difference is that on tip we make an unconditional jump for loop backedge (
@dr2chase is also working on loop unrolling, which may help from a different direction.
I guess we still don't want to copy instructions in the assembler?
Benchmark result on pretty recent 6th-gen i7 (i7-6600U) on linux/amd64 for go18 and gotip (
So here it is also ~ 50% slowdown.