perf: optimize String.compare (#13796)
This PR optimizes `String.compare` to turn it into 1 instead of 2 `memcmp` calls.
This commit is contained in:
parent
34df732066
commit
a3fff15212
1 changed files with 1 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ namespace String
|
|||
/--
|
||||
Lexicographic comparison of strings
|
||||
-/
|
||||
@[extern "lean_string_compare"]
|
||||
def compare (s₁ s₂ : @& String) : Ordering :=
|
||||
compareOfLessAndEq s₁ s₂
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue