Skip to content

Commit

Permalink
feat: Optimize sort by MergeSort
Browse files Browse the repository at this point in the history
The `MergeSort` function is in the hot path.
The slice (x[1..]) operation is not optimized in Dafny.
This optimizes this function by turning the recursive slice
into a loop over an index into the seq.
Further, a bounded integer version is also included.

It also limits the total amount of data copied.
  • Loading branch information
seebees committed Oct 31, 2024
1 parent 1d836c9 commit 7dc718c
Show file tree
Hide file tree
Showing 2 changed files with 529 additions and 2 deletions.
Loading

0 comments on commit 7dc718c

Please sign in to comment.