On Aug 4, 11:08 am, Jonas <jonas.enl...@gmail.com> wrote:
> Can you give any hints on how I can make the transient sort faster? I
> would like to get as close as possible to the native Java speed.

You are comparing apples to oranges. Clojure's persistent vectors do
not magically turn into Java arrays when using the new transients
feature; they are still good old persistent vectors, with the added
bonus that some operations can be done by mutating existing structure.
But this structure is still the same old awesome piece of persistent
vector!

A bit lame analogy, but maybe helps some people understand the point
I'm trying to make. It's like the good old story about how MySQL is
"faster" than PostgreSQL. Not. At least if you want safety.

What the native sort function does is just what I wanted to suggest
you do: turn the persistent vector into a plain old array, sort that,
and then convert the sorted array back into a Clojure data structure.
--~--~---------~--~----~------------~-------~--~----~
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