On Sat, Jul 4, 2009 at 5:00 AM, Nicolas Oury<[email protected]> wrote: > Dear all, > > In another thread, we realized that setting an array of primitive type (it > was double in our example) is far quicker in > Java than in Clojure. > > After looking to the implementation of aset-* in Clojure 1.0, I realize that > it calls the set* method of java.reflect.Array. > Is there a way of avoiding that? > > Could the aset-* and aget family was not special forms implemented using > their JVM bytecode counterparts. (dastore, in this example) > Is it something impossible to do? Or not a good idea? Or to be done later? > > There have been some long threads about scientific programs in Clojure, and > having array access to primitive types as fast as in java would be a good > start to authorize cpu intensive programs to be written in clojure. > >
As I replied in the other thread, the ways to get primitive array access as fast as Java are documented here: http://clojure.org/java_interop#primitives http://clojure.org/java_interop#optimization Rich --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
