Hello,
I just have a look at your code. I was wondering why reflect.Array/getDouble
was faster than aget?
And I realized than you create arrays of objects and not array of doubles.

Have you tried to replace make-array by double-array?
I am not a Java specialist but if I understand well the API ot should create
an array of unboxed doubles, making acces really faster. (No creation of
Object when you write, nor indirection when you read).

For access, I would use (double (aget ...)). But I am not sure.

Can a clojure expert tell whether there is something like aget-double or
another way to do it?

You can also try to replace the arithmetic by unchecked arithmetic. (Is it
correct from the point of view of the semantic of the VM you are
implementing?).

Can you try to check in your profiling whether the function you generate get
compiled or not?

What function are you running at the top level? Is that a loop where you run
multiple times the same program?

Best regards,

Nicolas.

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