mirror of
https://github.com/junegunn/fzf.git
synced 2026-03-01 21:07:08 +08:00
Enable uint64 compareRanks on arm64
Extend the uint64 rank comparison trick (comparing [4]uint16 as a single uint64) to arm64 builds. ARM64 is little-endian like x86, so the same unsafe.Pointer cast produces correct lexicographic ordering. This replaces a 4-iteration loop with a single uint64 comparison, speeding up the sort phase. Chromium file list, single-threaded: linux: 126ms -> 126ms (sort not dominant) src: 462ms -> 438ms (-5%, sort-heavy)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//go:build !386 && !amd64
|
||||
//go:build !386 && !amd64 && !arm64
|
||||
|
||||
package fzf
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build 386 || amd64
|
||||
//go:build 386 || amd64 || arm64
|
||||
|
||||
package fzf
|
||||
|
||||
|
||||
Reference in New Issue
Block a user