gofrontend/gccgo: Improve identity comparison #21618
In 2016 gcc introduced the
The basic idea is to replace a larger chain of integer comparisons loaded from contiguous memory locations into a smaller chain of bigger integer comparisons. Benefits are twofold:
As a first step, I’m simply proposing to replace calls to
In first second example above, this would change the generated code (
To (in both cases):
This is both smaller in terms of code size and much more efficient.
The text was updated successfully, but these errors were encountered: