Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
meooow25 authored May 4, 2024
1 parent b428037 commit f1b07dc
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions compare/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
## Comparison with other sorts

> `TODO: Update with latest data`
# Benchmarks

Benchmarking done with GHC 9.6.3 -O and the [criterion](https://hackage.haskell.org/package/criterion)
library. See `Main.hs` for details on the test cases. The output CSV file
is at [`result/result.csv`](result/result.csv).

### Large, sort $10^5$ `Int`s
![100000](https://github.com/meooow25/samsort/assets/13716304/81ec7063-d17d-4ade-925c-98418a3e90e5)
## Comparing with other libraries

| Label | Library | Function |
| --- | --- | --- |
| `ssArray` | `samsort` | `Data.SamSort.sortArrayBy` |
| `ssIntArray` | `samsort` | `Data.SamSort.sortIntArrayBy` |
| `vaHeap` | `vector-algorithms` | `Data.Vector.Algorithms.Heap.sortBy` |
| `vaIntro` | `vector-algorithms` | `Data.Vector.Algorithms.Intro.sortBy` |
| `vaMerge` | `vector-algorithms` | `Data.Vector.Algorithms.Merge.sortBy` |
| `vaTip` | `vector-algorithms` | `Data.Vector.Algorithms.Tim.sortBy` |
| `ps` | `primitive-sort` | `Data.Primitive.Sort.sortMutableBy` |

An `-i` suffix indicates that the sort was done by index.

### 1. Sort $10^5$ `Int`s (boxed)

![Int](https://github.com/meooow25/samsort/assets/13716304/5d6887f6-c5a6-4a83-b173-49885d09e48d)

### 2. Sort $10^5$ `Maybe Int`s (boxed)

![MaybeInt](https://github.com/meooow25/samsort/assets/13716304/8233588b-0648-42f8-be04-9a1e86d5f537)

### 3. Sort $10^5$ `Int`s (unboxed)

![IntPrim](https://github.com/meooow25/samsort/assets/13716304/e8fd8bc6-f89c-4d34-ba9d-5b9aae346c64)

### 4. Sort $10^5$ `(Int, Int, Int)`s (unboxed)

![Int3Unbox](https://github.com/meooow25/samsort/assets/13716304/fde8526e-10a6-4ed0-8edd-22d7f54a39c0)

### 5. Sort $10^5$ `Word8`s (unboxed)

![Word8Unbox](https://github.com/meooow25/samsort/assets/13716304/658b0374-7394-48a2-a748-13956bfb3cf0)

### Small, sort $10$ `Int`s
![10](https://github.com/meooow25/samsort/assets/13716304/9bd428f6-ba73-4c4e-87e5-8eb2c29ccac2)

0 comments on commit f1b07dc

Please sign in to comment.