Skip to content

Commit

Permalink
perf: use div
Browse files Browse the repository at this point in the history
  • Loading branch information
Lampese authored and bobzhang committed Mar 25, 2024
1 parent 9903fc9 commit 904cc9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion array/sort.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ fn get_limit(len : Int) -> Int {
let mut len = len
let mut limit = 0
while len > 0 {
len = len.land(len - 1)
len = len / 2
limit += 1
}
limit
Expand Down

0 comments on commit 904cc9f

Please sign in to comment.