]> Cypherpunks repositories - gostls13.git/commit
runtime: check pointer equality in arm64 cmpbody
authorDave Cheney <dave@cheney.net>
Tue, 25 Aug 2015 03:12:32 +0000 (13:12 +1000)
committerDave Cheney <dave@cheney.net>
Tue, 25 Aug 2015 03:29:47 +0000 (03:29 +0000)
commit686d44d9e0c4e43716f8dd51ffaf81b8754f3620
tree422df5cbc1899b22dfedc9d82c8ce0f396e47df6
parent3efe36d4c46c609b036f3d6eb209788aa71ec57f
runtime: check pointer equality in arm64 cmpbody

Updates #11336

Follow the lead of amd64 by doing a pointer equality check
before comparing string/byte contents on arm64.

BenchmarkCompareBytesEqual-8               25.8           26.3           +1.94%
BenchmarkCompareBytesToNil-8               9.59           9.59           +0.00%
BenchmarkCompareBytesEmpty-8               9.59           9.17           -4.38%
BenchmarkCompareBytesIdentical-8           26.3           9.17           -65.13%
BenchmarkCompareBytesSameLength-8          16.3           16.3           +0.00%
BenchmarkCompareBytesDifferentLength-8     16.3           16.3           +0.00%
BenchmarkCompareBytesBigUnaligned-8        1132038        1131409        -0.06%
BenchmarkCompareBytesBig-8                 1126758        1128470        +0.15%
BenchmarkCompareBytesBigIdentical-8        1084366        9.17           -100.00%

Change-Id: Id7125c31957eff1ddb78897d4511bd50e79af3f7
Reviewed-on: https://go-review.googlesource.com/13885
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/asm_arm64.s