On Thu, Dec 30, 2010 at 4:19 PM, Mark Engelberg <mark.engelb...@gmail.com> wrote: > On Thu, Dec 30, 2010 at 11:01 AM, Ken Wesson <kwess...@gmail.com> wrote: >> I hope that didn't include a naive benchmarking of >> take/drop/concat/seq. Because three of those are lazy, you need to >> wrap the output of an algorithm using them in a (doall ...) and then >> in your timing function to get an accurate read on the amount of time >> it actually takes to perform the full algorithm. > > Yes, I compared with doall. Try it and let me know if you get > different results, but I find that traversing a finger tree is so much > slower than traversing a sequence, it all but nullifies any advantages > you get from other operations (even assuming the other operations are > way faster, which they typically are not).
Are these searches, which should be log n? Or full (e.g. in-order) traversals? Traversals of persistent trees can be tricky, since there won't be a parent pointer on each node. But I'd think a judicious use of tree-seq would be effective in traversing one decently. I can test this when I have more time: implement a red-black finger tree, say, and check the speeds of various operations including a tree-seq based in-order traversal. -- 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