In your example, why are you using struct-map to create your structs
instead of just using struct?

(struct rect-struct ::rect [50 50] 100 190)

produces the same struct, but is about three times faster than using
struct-map.

(time (dotimes [x 1000000]
         (struct-map rect-struct :tag ::rect :position [50 50] :width
100 :height 190)))
"Elapsed time: 1016.835101 msecs"

(time (dotimes [x 1000000]
         (struct rect-struct ::rect [50 50] 100 190)))
"Elapsed time: 393.569714 msecs"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to