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 Nov 1, 2024
1 parent b4a071a commit ea794cc
Show file tree
Hide file tree
Showing 2 changed files with 529 additions and 2 deletions.
Loading

0 comments on commit ea794cc

Please sign in to comment.