(index ("current-benchmark-iterations" 0) ("benchmark-measure" 184) ("benchmark-run" 333) ("benchmark-ips" 897))
(def (sig (parameter "current-benchmark-iterations" (id current-benchmark-iterations))) (p "The amount of iterations that are used in " (b "benchmark-run") ". This defaults to 100."))
(def (sig (syntax "(benchmark-measure ?code)" (id benchmark-measure))) (p "Runs the " (b "?code") " once and returns the runtime in microseconds."))
(def (sig (syntax "(benchmark-run [iterations] ?code)" (id benchmark-run))) (p "Runs the " (b "?code") " " (b "iterations") " times and returns an alist with the following keys:") (ul (li "min - the minimum runtime of all iterations in microseconds") (li "max - the maximum runtime of all iterations in microseconds") (li "mean - the average runtime of all iterations in microseconds") (li "standard-deviation - the sample standard deviation for the given runtimes")) (p "If " (b "iterations") " is not given then " (b "curren-benchmark-iterations") " is used."))
(def (sig (syntax "(benchmark-ips [seconds] ?code)" (id benchmark-ips))) (p "Determines how many times one can run the given " (b "?code") " per second and returns an alist with the following keys:") (ul (li "mean               - the mean amount iterations we can make per second") (li "standard-deviation - the sample standard deviation for the given iterations")) (p "If " (b "seconds") " is not given then it defaults to 5."))
