I'm often in need of performance comparisons/recommendations about
different ways to code the same usecases. E.g.
(time(let [x 2 y [0 1 2 3 4]] (dotimes [_ 10000000] (remove *#{x}*y))))
;~950 ms
(time(let [x 2 y [0 1 2 3 4]] (dotimes [_ 10000000] (remove *#(= % x)*y))))
;~150 ms
(time(let [a (int-array 10)] (dotimes [_ 10000000] (*aset *a 1
2)))) ;~7 ms
(time(let [a (int-array 10)] (dotimes [_ 10000000] (*aset-int *a 1
2)))) ;~430 ms
I'd recommend to gather such information at a central place in a more
systematic way. So I wonder:
- where to place such information
(Wiki?)<http://en.wikibooks.org/wiki/Clojure_Programming>
- whether this information is of use
- whether you have more recommendations regarding performance or the
form, advices are presented
*Thanks, Marc*
--
--
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/groups/opt_out.