PLAYBOOK · CODE BENCHMARK
Comparing two number functions with a Clojure benchmark
Clojure benchmark experiment
Upendra Upadhyay shared a Clojure benchmark setup in March 2024. Upadhyay says they used these testing tools at work. Their sample compared two number functions. The printed results used 60 samples for each test.
Upadhyay kept benchmark tests in a separate folder and selected them with a special test command. They wrote the results to files and collected a graph showing where time went. Their sample benchmark ran for 182 seconds. The slower function’s mean time was 21.807202 µs. The other mean was 1.808515 µs. Here, µs means a millionth of a second. The writer’s output also showed 0 failures and 0 errors for the ordinary tests. Our suggestion: This suits learners who want to measure their own Clojure code.
- Upadhyay’s printed benchmark ran for 182 seconds.
- Both result files listed 60 samples.
- The printed mean times were 21.807202 µs and 1.808515 µs.
- Their ordinary test output showed 0 failures and 0 errors.
Read Upendra Upadhyay's blog post
Source: Upendra Upadhyay · Clojure benchmark experiment · checked 2026-12-02