]> Cypherpunks repositories - gostls13.git/commit
runtime: add arm64 runtime.cmpstring and bytes.Compare
authorDave Cheney <dave@cheney.net>
Tue, 7 Apr 2015 11:38:02 +0000 (21:38 +1000)
committerDave Cheney <dave@cheney.net>
Thu, 9 Apr 2015 14:49:31 +0000 (14:49 +0000)
commitee349b5d771b1c3e58f77b07e200a0a630667f22
tree3ec38956bed7aa1a4faa8b41809314f4568e3410
parentb9ba4ed22b2f6237042bafcfa697593a73281f36
runtime: add arm64 runtime.cmpstring and bytes.Compare

Add arm64 assembly implementation of runtime.cmpstring and bytes.Compare.

benchmark                                old ns/op     new ns/op     delta
BenchmarkCompareBytesEqual               98.0          27.5          -71.94%
BenchmarkCompareBytesToNil               9.38          10.0          +6.61%
BenchmarkCompareBytesEmpty               13.3          10.0          -24.81%
BenchmarkCompareBytesIdentical           98.0          27.5          -71.94%
BenchmarkCompareBytesSameLength          43.3          16.3          -62.36%
BenchmarkCompareBytesDifferentLength     43.4          16.3          -62.44%
BenchmarkCompareBytesBigUnaligned        6979680       1360979       -80.50%
BenchmarkCompareBytesBig                 6915995       1381979       -80.02%
BenchmarkCompareBytesBigIdentical        6781440       1327304       -80.43%

benchmark                             old MB/s     new MB/s     speedup
BenchmarkCompareBytesBigUnaligned     150.23       770.46       5.13x
BenchmarkCompareBytesBig              151.62       758.76       5.00x
BenchmarkCompareBytesBigIdentical     154.63       790.01       5.11x

* note, the machine we are benchmarking on has some issues. What is clear is
compared to a few days ago the old MB/s value has increased from ~115 to 150.
I'm less certain about the new MB/s number, which used to be close to 1Gb/s.

Change-Id: I4f31b2c7a06296e13912aacc958525632cb0450d
Reviewed-on: https://go-review.googlesource.com/8541
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/runtime/asm_arm64.s
src/runtime/noasm.go