b0535bddd6
This pragma instructs compiler to remove all bounds checks from the annotated function. This can be helpful when tuning performance of hot tight loops where compiler is unable to eliminate bounds check itself. For very tight loops I have measured 25-50% overhead from bounds checks which I think comes from some combination of general code quality issues due to fixed input registers and increased branch density. In future it could be possible to teach our range analysis to eliminate bounds checks when loop bound is itself bounded by array length, but for now we can resort to this pragma for extremely hot library code. Issue https://github.com/dart-lang/sdk/issues/55522 TEST=vm/cc/BoundsCheckElimination_Pragma R=alexmarkov@google.com Change-Id: Ia7b1e88a16a2b45fa8593a227a4985568892b29c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364500 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Slava Egorov <vegorov@google.com>