Conversation
Slightly more details on issue #328. I only spent time on `reads` benchmark, which creates an array and iterates on it. On a recent GHC HEAD (`378c0bba7d`), here're the current results: ``` $ cabal bench --benchmark-options 'arrays/reads' ... benchmarked arrays/reads/Data.Array.Mutable.Linear time 191.7 ms (185.3 ms .. 195.9 ms) 0.999 R² (0.997 R² .. 1.000 R²) mean 213.9 ms (206.2 ms .. 226.2 ms) std dev 16.61 ms (9.796 ms .. 25.32 ms) variance introduced by outliers: 19% (moderately inflated) benchmarked arrays/reads/Data.Vector time 58.77 ms (58.64 ms .. 58.88 ms) 1.000 R² (1.000 R² .. 1.000 R²) mean 67.59 ms (64.36 ms .. 75.56 ms) std dev 8.991 ms (3.925 ms .. 14.61 ms) variance introduced by outliers: 48% (moderately inflated) ``` The benchmark methodology is not ideal, since all benchmarks include creation of the underlying array/vector. The reason is that the `gauge` library we are using for benchmarks is not implemented with linear arrows so we can not use its API easily to pass a linear value to a benchmark. There might be a way to work around this implementation using `gauge` (or another benchmarking library), but I didn't spend too much time on it.
aspiwack
approved these changes
Jun 18, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slightly more details on issue #328.
I only spent time on
readsbenchmark, which creates an arrayand iterates on it. On a recent GHC HEAD (
378c0bba7d), here'rethe current results:
The benchmark methodology is not ideal, since all benchmarks include
creation of the underlying array/vector. The reason is that the
gaugelibrary we are using for benchmarks is not implemented with linear
arrows so we can not use its API easily to pass a linear value to a
benchmark. There might be a way to work around this implementation using
gauge(or another benchmarking library), but I didn't spend too muchtime on it.