Skip to content

Commit

Permalink
chore: Add Noir version compatibility description (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Savio-Sou authored Jan 2, 2025
1 parent ac3b948 commit a3c503c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

Efficiently sorts fixed-sized arrays.

# Usage
## Noir version compatibility

This library is tested with all Noir stable releases from v0.36.0.

## Usage

1. Basic usage:

Expand Down Expand Up @@ -47,11 +51,11 @@ fn foo(a: [u16; 100]) -> [u16; 100] {
}
```

# Comments
## Comments

The `sort_extended` method is likely to be the most efficient method as asserting that `a <= b` costs fewer constraints than determining whether `a <= b` and assigning a bool to the outcome (e.g. for a `u16`, the `<=` operator needs to constrain the case where `a <= b` and `a > b` and then conditionally assign the return value to the correct case)

# Algorithm Description
## Algorithm Description

The library executes, in an unconstrained function, a quicksort algorithm to determine the sorted array.

Expand Down

0 comments on commit a3c503c

Please sign in to comment.