-
Notifications
You must be signed in to change notification settings - Fork 293
Update benchmarks #6106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Update benchmarks #6106
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
| SCRIPTDIR="$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")" | ||
|
|
||
| ### Run the Unison benchmark suite. | ||
| ### | ||
| ### NB: If run as a superuser (e.g., under `sudo`), this will use a higher priority to hopefully get more stable | ||
| ### results. | ||
|
|
||
| ## TODO: `transcripts` should be able to take a search path, but since it currently looks for files relative to its run | ||
| ## path, we `cd` to where it can find them. | ||
| cd "$SCRIPTDIR/.." | ||
|
|
||
| niceness=0 | ||
| if [[ $EUID -eq 0 ]]; then | ||
| niceness=-20 | ||
| fi | ||
|
|
||
| nice -n $niceness stack exec unison -- transcript unison-src/transcripts-manual/benchmarks.md |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,96 +1,7 @@ | ||
| ``` ucm :hide | ||
| > pull unison.public.base.releases.M4d base | ||
| > pull runarorama.public.sort.data sort | ||
| ``` | ||
|
|
||
| ``` unison :hide | ||
| benchmarkFilePath = FilePath "unison-src/transcripts-manual/benchmarks/output.bench.txt" | ||
| archiveFilePath = FilePath "unison-src/transcripts-manual/benchmarks/output" | ||
|
|
||
| timeit : Text -> '{IO,Exception} a ->{IO,Exception} a | ||
| timeit label a = | ||
| before = !realtime | ||
| r = !a | ||
| after = !realtime | ||
| elapsed = Duration.between before after | ||
| elapsedText = Duration.toText elapsed | ||
| go file = | ||
| putText file ("\n" ++ label ++ " " ++ Int.toText (Duration.countMicroseconds elapsed) ++ " # " ++ elapsedText) | ||
| printLine ("\n\n ******** \n") | ||
| printLine (label ++ " took " ++ elapsedText) | ||
| bracket '(FilePath.open benchmarkFilePath FileMode.Append) Handle.close go | ||
| r | ||
|
|
||
| prepare = do | ||
| -- if benchmarkFilePath exists, move it to blah-<datetime>.txt for archive purposes | ||
| use Text ++ | ||
| if FilePath.exists benchmarkFilePath then | ||
| createDirectory archiveFilePath | ||
| now = OffsetDateTime.toText (atUTC !realtime) | ||
| timestamped = FilePath.toText archiveFilePath ++ "/" ++ now ++ "-bench.txt" | ||
| renameFile benchmarkFilePath (FilePath timestamped) | ||
| else | ||
| () | ||
| ``` | ||
|
|
||
| ``` ucm :hide | ||
| > add | ||
| > run prepare | ||
| ``` | ||
|
|
||
| ## Benchmarks | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/each.u | ||
| > run main | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/listmap.u | ||
| > run main | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/listfilter.u | ||
| > run main | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/random.u | ||
| > run main | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/simpleloop.u | ||
| > run main | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/fibonacci.u | ||
| > run main | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/map.u | ||
| > run main | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/natmap.u | ||
| > run main | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/stm.u | ||
| > run main | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/tmap.u | ||
| > run main | ||
| > pull @pchiusano/misc-benchmarks | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > load unison-src/transcripts-manual/benchmarks/array-sort.u | ||
| > run main | ||
| > run suite | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ``` ucm :hide | ||
| > pull @pchiusano/misc-benchmarks | ||
| ``` | ||
|
|
||
| ``` ucm | ||
| > run suite | ||
|
|
||
| () | ||
| ``` | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's a particular release of this that we want to pull that would probably be good; if there isn't a release, then let me or Paul know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are currently no releases of @pchiusano/misc-benchmarks.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pchiusano Can you create a release of https://share.unison-lang.org/@pchiusano/misc-benchmarks and then tag @sellout
(Unless there's some reason why we don't care about those benchmarks.)
And also if you're in there is it appropriate and easy to change
Value.serialize_v4usages to v5, if appropriate?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are trying to move to ghc 9.10 in order to update other parts of the toolchain, but trying to make sure we don't lose some important optimization without realizing it. Here's benchmark outputs Greg found in their tentative ghc 9.10 update branch.
#6046 (comment)