-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
83x faster than current implementation ``` (run-benchmark (fn [] (testing "`promesa.exec.csp` implementation" ;; 4.956172 µs — this is due to `promesa.exec/wrap-bindings`'s way of forwarding ;; bindings, which is 83x slower than `clojure.core/binding-conveyor-fn` (criterium/bench (csp/go)) ;; 4.889489 ms (criterium/bench (dotimes [i 1000] (csp/go)))) (testing "Bare implementation" ;; 59.033042 ns (criterium/bench (-> (Thread/ofVirtual) (.unstarted (fn [])) (.start)))) (testing "With bindings forwarding" ;; 58.851215 ns (criterium/bench (-> (Thread/ofVirtual) (.unstarted (binding-conveyor (^{:once true} fn* [] ~@Body))) (.start)))))) ```
- Loading branch information
1 parent
be4ea19
commit c099142
Showing
1 changed file
with
48 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters