In the particular bit of code I'm working on, I have a collection of
vectors. The last one is always [] and no others are empty. Using
`identical?` instead of `seq` to detect that last vector shaved quite
a bit of time in my loop.

This brought to mind the general case of detecting emptiness. The
current practice of using `seq` to check for non-emptiness wastes
resources. This limits the use of nice abstractions like `reduce` in
performance critical environments where a sentinel could be used. Not
everyone will be able to use a sentinel value to solve their
particular problem. What can be done to make `empty` faster?

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