Created
October 1, 2012 02:44
-
-
Save w01fe/3809199 to your computer and use it in GitHub Desktop.
Fancier Graph compilation examples
This file contains hidden or 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
(def lazy-stats (graph/lazy-compile stats-graph)) | |
(:m (lazy-stats {:xs [1 2 3 6]})) | |
; ==> 3 | |
; WIN: :m2 and :v are not computed. | |
(def par-stats (graph/parallel-compile stats-graph)) | |
(:v (par-stats {:xs [1 2 3 6]})) | |
; ==> 3.5 | |
; WIN: :m and :m2 are computed in parallel. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment