To add my voice to Sean's, I have found over and over that any advantage of
C++ over Java in terms of performance is purely theoretical and is
completely over-shadowed by the fact that with C++ you spend your time
chasing silly mistakes whereas in Java you get to spend much more time on
optimization.

I just went through a major exercise where we replaced well over a hundred
thousand lines of "tuned" C++.  The result in Java is (a) 10x less code, (b)
much faster, (c) easier to test automatically, (d) easily scalable using
Hadoop and Katta, and (e) now works correctly.  Other major benefits have
been that I was able to leverage open source code resources to add massive
amounts of functionality.

Even in numerical code, there is no important difference:

http://blog.mikiobraun.de/2009/04/some-benchmark-numbers-for-jblas.html
http://www.mail-archive.com/[email protected]/msg09945.html

What you see here is that if you compare java versus pure C++, you get
essentially identical results.  If you compare pure java against C+specially
tuned assembler, you get as much as a 2x advantage for C.  Of course, you
can use the specially tuned assembler code in java as well.

On Sat, Aug 22, 2009 at 11:50 AM, Tim Hughes <[email protected]> wrote:

>
> I'm working on a project which is considering the Apache Lucine/SOLR/Mahout
> tech stack for a data mining & machine learning project.
>
> The issue of Java algorithm performance vs C/C++ has come up, and I would
> like to know if it is possible to create custom algorithms in C/C++ and use
> them within the Mahout framework. I have been unable to find information on
> this.
> --
> View this message in context:
> http://www.nabble.com/Custom-Algorithm-%28C-C%2B%2B%29---tp25096676p25096676.html
> Sent from the Mahout User List mailing list archive at Nabble.com.
>
>


-- 
Ted Dunning, CTO
DeepDyve

Reply via email to