On Wed, Jun 13, 2012 at 8:22 PM, Warren Lynn <wrn.l...@gmail.com> wrote:
> It is very common for all elements in a vector to be always of the same
> type. Is there any way to hint the type to Clojure? Does such hint can even
> improve performance? Thank you.
>

In general, not through type hints. However, there are implementations
of vector for primitive types, accessed using the "vector-of"
constructor function.
(http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/vector-of)

These are at least more space efficient, I'm not sure how they compare
performance-wise.

--Aaron

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