We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here is a basic example:
(ns bad.performance.test (:require [pixie.time :as time])) (println "No issue") (dotimes [i 10] (t/time (reduce (fn ([_ _] nil)) nil (range 10000000)))) (println "Multi-arity issue") (dotimes [i 10] (t/time (reduce (fn ([_ _] nil) ([_])) nil (range 10000000))))
The output is below:
"Elapsed time: 36.200522 ms" "Elapsed time: 28.493774 ms" "Elapsed time: 32.007228 ms" "Elapsed time: 32.310871 ms" "Elapsed time: 31.159702 ms" "Elapsed time: 30.122666 ms" "Elapsed time: 27.858281 ms" "Elapsed time: 27.836514 ms" "Elapsed time: 29.166467 ms" "Elapsed time: 29.809780 ms" Multi-arity issue "Elapsed time: 255.087997 ms" "Elapsed time: 294.007728 ms" "Elapsed time: 336.469480 ms" "Elapsed time: 369.489639 ms" "Elapsed time: 433.686057 ms" "Elapsed time: 539.577651 ms" "Elapsed time: 654.685995 ms" "Elapsed time: 776.953019 ms" "Elapsed time: 1090.215928 ms" "Elapsed time: 835.943882 ms"
The performance seems to constantly degrade when a multi-arity fn is used.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here is a basic example:
The output is below:
The performance seems to constantly degrade when a multi-arity fn is used.
The text was updated successfully, but these errors were encountered: