On Tue, Aug 4, 2009 at 3:55 PM, Albert Cardona<sapri...@gmail.com> wrote:
>
> Jonas 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.
>
>
> My guess is that you need primitive type hints. For example:
>
>     (let [pivot-value (v pivot-index)]
>
>
>
> could be:
>
>    (let [pivot-value (int (v pivot-index))]
>
>
> ... and so on.
>
> Albert
>

I have tried to add type hints but they don't seem to speed things up.
For example, if I add type hints to the partition! loop (where I would
have thought that
type hints would make the biggest difference) I don't see a speedup at all:

(defn partition! [....]
   ...
   (loop [i (int left-index) store-index (int left-index)]
   ...)

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