diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2021-10-12 15:38:52 -0700 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2021-10-13 18:15:48 +0000 |
| commit | 40f82f8a092ac1f23eb3af86f34b7436a6fc19e0 (patch) | |
| tree | d891e515186ae13a636896e9416879cc173f8529 /src/syscall/exec_linux.go | |
| parent | 4efa216c9d753c0853aa96a8c54ed5014fbc12e6 (diff) | |
| download | go-40f82f8a092ac1f23eb3af86f34b7436a6fc19e0.tar.xz | |
unsafe: optimize Slice bounds checking
This reduces the number of branches to bounds check non-empty slices
from 5 to 3. It does also increase the number of branches to handle
empty slices from 1 to 3; but for non-panicking calls, they should all
be predictable.
Updates #48798.
Change-Id: I3ffa66857096486f4dee417e1a66eb8fdf7a3777
Reviewed-on: https://go-review.googlesource.com/c/go/+/355490
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/syscall/exec_linux.go')
0 files changed, 0 insertions, 0 deletions
