-
Notifications
You must be signed in to change notification settings - Fork 334
In-process benchmarking #370
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
Conversation
…on times instead of a cut-off on current time
…tics, like std-dev
…nner is not legacy
… status dot printing
| You'll see that the `benchmark/run` function takes two arguments: | ||
|
|
||
| 1. `f`: A function (a thunk) | ||
| 1. `run-ms`: A total time in milliseconds within which the function should be run as many times as possible |
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.
Please make sure you're using a monotonic clock for these measurements (wall clock time can jump around).
I don't know how this actually works in other languages, but in Racket you can provide a time-limit for a body of execution (see call-with-time-limit).
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.
Good point. I made sure it was a monotonic clock for Java and Clojure, but I shall now check the other language implementations. It's probably fine, but I didn't pay attention to that so could have slipped in some wall clocking.
Couldn't reopen #365, so a new PR. 😄
I have:
run.shscript, from before and after the change.Description of changes
This is the start of what I said in #341 that I should try to implement in-process benchmarking for Clojure, Java, and C. Starting with Clojure, to get it as right as possible before cloning the approach to any other languages.
I think the changes are best described in the New runner section in the updated README.md, plus:
Addressing: