That was it. I didn't think that calling the method directly on the record would use reflection.
(dotimes [_ 10] (time (dotimes [_ 10000] (m1 my-simple-P "hello")))) "Elapsed time: 14.765 msecs" "Elapsed time: 5.347 msecs" "Elapsed time: 21.427 msecs" "Elapsed time: 7.267 msecs" "Elapsed time: 2.88 msecs" "Elapsed time: 2.675 msecs" "Elapsed time: 6.643 msecs" "Elapsed time: 2.548 msecs" "Elapsed time: 2.773 msecs" "Elapsed time: 2.833 msecs" So from this it seems that using extend might be somewhat slower, but not that much, and it is much more convenient for code reuse (the numbers I am getting are not very reliable since there are other processes going on in this desktop computer). Thanks for your help, Toni. On Aug 21, 2:07 pm, Meikel Brandmeyer <m...@kotka.de> wrote: > Hi, > > Am 21.08.2010 um 07:33 schrieb Toni Batchelli: > > > (dotimes [_ 10] (time (dotimes [_ 10000] (.m1 my-simple-P "hello")))) ; > > > "Elapsed time: 131.973 msecs" > > I think you get caught by reflection here. As Nicholas said, you should call > m1, not .m1. > > Sincerely > Meikel -- 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 Note that posts from new members are moderated - please be patient with your first post. 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