This might help: java libraries for fast computing. I guess they will
be usable from within clojure as well.

http://acs.lbl.gov/~hoschek/colt/

Welcome to the Colt Project. Colt provides a set of Open Source
Libraries for High Performance Scientific and Technical Computing in
Java.

Scientific and technical computing, as, for example, carried out at
CERN, is characterized by demanding problem sizes and a need for high
performance at reasonably small memory footprint. There is a
perception by many that the Java language is unsuited for such work.
However, recent trends in its evolution suggest that it may soon be a
major player in performance sensitive scientific and technical
computing. For example, IBM Watson's Ninja project showed that Java
can indeed perform BLAS matrix computations up to 90% as fast as
optimized Fortran. The Java Grande Forum Numerics Working Group
provides a focal point for information on numerical computing in Java.
With the performance gap steadily closing, Java has recently found
increased adoption in the field. The reasons include ease of use,
cross-platform nature, built-in support for multi-threading, network
friendly APIs and a healthy pool of available developers. Still, these
efforts are to a significant degree hindered by the lack of foundation
toolkits broadly available and conveniently accessible in C and
Fortran.

I ran into these when fiddling with JUNG, as I'll be drawing networks
soon.

Another speedup I recently managed to integrate in clojure into a
simulation is the brics automaton regular expression engine, which is
faster than java regex engine.

Good luck!
On 12 jan, 10:42, "Christian Vest Hansen" <karmazi...@gmail.com>
wrote:
> On Mon, Jan 12, 2009 at 6:41 AM, Mark P <pierh...@gmail.com> wrote:
> > 1. Some of the algorithms I use have the potential
> > to be parallelized.  I am hoping that as the number
> > of cores in PCs increase, at some point Clojure's
> > performance will beat C++'s due to Clojure's
> > superior utilization of multiple cores.  (Any ideas
> > on how many cores are needed for this to become
> > true?)
>
> Asuming the right algorithm, single-threaded C++ and no reflection or
> boxing overhead in Clojure, then I think 2 will do.
>
>
>
> > 2. The JVM is continually being improved.  Hopefully
> > in a year or two, the performance of HotSpot will be
> > closer to that of C++.  (But maybe this is just
> > wishful thinking.)
>
> We're already there. As Konrad said, they optimize differently so
> objective testing is hard. I think that Java is behind on optimizing
> cache locality because the structure of the typical Java program makes
> this a harder problem, that's what I've heard anyway.
>
> Sun has some wiki pages on HotSpot specific optmization techniques,
> which might come in handy when you want to squeeze those last 5% of
> performance.
>
>
>
> > 3. Maybe I can implement certain performance critical
> > components in C++ via the JNI.  (But I get the impression
> > that JNI itself isn't particularly efficient.  Also, the more
> > I pull over into the C++ side, the fewer advantages to
> > using Clojure.)
>
> JNA might be an alternative to JNI:https://jna.dev.java.net/
> But I wouldn't know; haven't used either.
>
> But instead of interfacing with C++, you might find that simply
> interfacing with Java will provide enough of a boost in those
> super-critical sections. Unless, that is, if your C++ is using dirty
> tricks like CUDA and what-ever-the-AMD-version-is-called. :)
>
>
>
>
>
>
>
> > If all else fails, maybe I could use Clojure as a prototyping
> > language.  Then when I get it right, I code up the actual
> > programs in C++.  But probably a lot would get lost in
> > the translation from Clojure -> C++ so would it be worth
> > it?
>
> > I'd love to be convinced that Clojure is a viable choice,
> > but I need to be a realist too.  So what do people think?
> > How realistic are my three "hopes"?  And are there
> > any other performance enhancing possibilities that I
> > have not taken into account?
>
> > Thanks,
>
> > Mark P.
>
> --
> Venlig hilsen / Kind regards,
> Christian Vest Hansen.- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -
--~--~---------~--~----~------------~-------~--~----~
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
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