mirror of
https://github.com/burrowers/garble.git
synced 2025-12-24 12:58:05 +08:00
remove now-redundant len shortcut in _originalNames
As Paul Scheduikat points out, the loop already does not start
if the length of name is less than minHashLength.
│ old │ new │
│ sec/op │ sec/op vs base │
AbiOriginalNames-8 135.6µ ± 1% 135.5µ ± 0% ~ (p=1.000 n=7)
This commit is contained in:
@@ -24,10 +24,6 @@ package main
|
||||
|
||||
//disabledgo:linkname _originalNames internal/abi._originalNames
|
||||
func _originalNames(name string) string {
|
||||
if len(name) < minHashLength {
|
||||
// The name is too short to be obfuscated.
|
||||
return name
|
||||
}
|
||||
// We can stop once there aren't enough bytes to fit another obfuscated name.
|
||||
for i := 0; i <= len(name)-minHashLength; {
|
||||
switch name[i] {
|
||||
|
||||
Reference in New Issue
Block a user