Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cmd/compile: loops compiled differently when using range or index #31205
What version of Go are you using (
This appears to occur because of choices in the scheduler.
The inner loop in
The schedule in
This has been an issue for a while. I noted it in 2016: #16122 (comment)
Perhaps just a tweak to the scheduler is needed.
I'm unclear as to why the scheduler makes different choices here. Might just be how the values happened to be ordered on entry to the scheduler.