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
The following script demonstrates that returning a closure directly from the analyzer can have beneficial effect on performance:
;; run with: ;; clojure -J-Dclojure.compiler.direct-linking=true -M let_closure.clj ;; master: "Elapsed time: 6990.686673 msecs" ;; let-closure: "Elapsed time: 5351.171676 msecs" (require '[sci.core :as sci]) (def ctx (sci/init {})) (require '[sci.impl.analyzer :as ana]) (def analyzed (ana/analyze ctx '(let [x 1] x))) (require '[sci.impl.evaluator :as eval]) (prn (eval/eval ctx analyzed)) (time (dotimes [_ 10000000] (eval/eval ctx analyzed)))
I didn't see a regression in the binary loop example:
$ time tmp/let-closure "(loop [val 0 cnt 1000000] (if (pos? cnt) (recur (inc val) (dec cnt)) val))" 1000000 tmp/let-closure 1.45s user 0.09s system 99% cpu 1.544 total
(but unfortunately also no speedup)
The text was updated successfully, but these errors were encountered:
[#470] analyzer closure output: let
798a527
d9fb75a
No branches or pull requests
The following script demonstrates that returning a closure directly from the analyzer can have beneficial effect on performance:
I didn't see a regression in the binary loop example:
(but unfortunately also no speedup)
The text was updated successfully, but these errors were encountered: