9072cfaa14
This commit updates the benchmark timings and repeat counts for various example files. The `tester.rs` script has been modified to: - Correctly parse and use the `Benchmark-Repeat` directive. - Implement an adaptive sampling mechanism for more accurate median calculation, especially for long-running benchmarks. - Improve the logic for updating and inserting benchmark and repeat lines in example files. - Handle potential compilation and runtime errors during benchmark execution.
21 lines
437 B
Plaintext
21 lines
437 B
Plaintext
;; Benchmark: Record Destructuring Performance
|
|
;; This test calls a function that destructures a record 100.000 times.
|
|
;; Current implementation is now zero-allocation for destructuring.
|
|
;; Output: {:a 1, :b 2}
|
|
;; Benchmark: 5.2ms
|
|
|
|
(do
|
|
(def process (fn [[x y]]
|
|
(+ x y)))
|
|
|
|
(def rec {:a 1 :b 2})
|
|
|
|
(def loop (fn [n acc]
|
|
(if (= n 0)
|
|
acc
|
|
(loop (- n 1) (process rec)))))
|
|
|
|
(loop 10000 0)
|
|
rec
|
|
)
|