Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
T
Browse files Browse the repository at this point in the history
Vectorized committed Jan 20, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 6b9734e commit a871f1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/LibSort.sol
Original file line number Diff line number Diff line change
@@ -607,7 +607,7 @@ library LibSort {
for { let i := shl(5, mload(oriKeys)) } 1 {} {
let k := mload(add(oriKeys, i))
let v := mload(add(oriValues, i))
let j := s // Just do a linear scan. Faster for small `n`.
let j := s // Just do a linear scan to optimize for small `n` and bytecode size.
for {} iszero(eq(mload(j), k)) {} { j := add(j, 0x20) }
j := add(j, d) // Convert `j` to point into `values`.
mstore(j, add(mload(j), v))
@@ -619,7 +619,7 @@ library LibSort {
i := add(i, w) // `sub(i, 0x20)`.
if iszero(i) { break }
}
mstore(0x40, m) // Frees the temporary memory.
mstore(0x40, m) // Frees the memory allocated for the temporary copies.
}
}

0 comments on commit a871f1b

Please sign in to comment.