I can also confirm, tested on Clojure 1.8.0. The macro doesn't seem to take long at all; it's the expanded code that takes a significant time to compile.
On 21 July 2017 at 10:56, Peter Hull <[email protected]> wrote: > On Friday, 21 July 2017 00:35:00 UTC+1, Milt Reder wrote: >> >> Here's a simplified example: >> >> I can confirm that pasting that defn into a CIDER repl does take a long > time before the prompt comes back. I tried doing a "macro expand all" and > it was pretty much instantaneous. The resulting expansion is quite long but > not unreasonable (see below). Beyond that, I'm not sure how to analyse what > Clojure's doing or time it. I'm using 1.9 alpha by the way. > Pete > > (def wat > (fn* > ([& p__9335] > (let* > [map__9336 > p__9335 > map__9336 > (if (seq? map__9336) > (. clojure.lang.PersistentHashMap create (seq map__9336)) > map__9336) > a > (get map__9336 :a) > b > (get map__9336 :b) > c > (get map__9336 :c) > d > (get map__9336 :d) > e > (get map__9336 :e) > f > (get map__9336 :f) > map-0 > (get map__9336 :map-0) > map-1 > (get map__9336 :map-1) > map-2 > (get map__9336 :map-2)] > (let* > [G__9337 > "foo" > G__9337 > (if a (str G__9337 a) G__9337) > G__9337 > (if b (str G__9337 b) G__9337) > G__9337 > (if c (str G__9337 c) G__9337) > G__9337 > (if d (str G__9337 d) G__9337) > G__9337 > (if e (str G__9337 e) G__9337) > G__9337 > (if f (str G__9337 f) G__9337) > G__9337 > (if map-0 > (let* > [G__9338 > G__9337 > G__9338 > (if (:a map-0) (str G__9338 (:a map-0)) G__9338) > G__9338 > (if (:b map-0) (str G__9338 (:b map-0)) G__9338) > G__9338 > (if (:c map-0) (str G__9338 (:c map-0)) G__9338)] > (if (:d map-0) (str G__9338 (:d map-0)) G__9338)) > G__9337) > G__9337 > (if map-1 > (let* > [G__9339 > G__9337 > G__9339 > (if (:a map-1) (str G__9339 (:a map-1)) G__9339) > G__9339 > (if (:b map-1) (str G__9339 (:b map-1)) G__9339) > G__9339 > (if (:c map-1) (str G__9339 (:c map-1)) G__9339)] > (if (:d map-1) (str G__9339 (:d map-1)) G__9339)) > G__9337)] > (if map-2 > (let* > [G__9340 > G__9337 > G__9340 > (if (:a map-2) (str G__9340 (:a map-2)) G__9340) > G__9340 > (if (:b map-2) (str G__9340 (:b map-2)) G__9340) > G__9340 > (if (:c map-2) (str G__9340 (:c map-2)) G__9340)] > (if (:d map-2) (str G__9340 (:d map-2)) G__9340)) > G__9337)))))) > > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
