> Even with the optimization, sort somehow beats top for speed. It looks
> like top is best used to avoid major memory consumption for long seqs;
> if you have the memory and need the speed, sort's better.

This is an interesting characteristic I've noticed in sorting code. In  
the past (I'm thinking of one Common Lisp app in particular) I've  
spent time carefully crafting tree-based accumulators to collect  
values into a sorted collection... only to find that it was slower  
than just collecting the whole damn list and sorting it, even for very  
large collections. Seems all those tree/map operations take time, and  
library sort functions are fast!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to