Login  Register

Language war

Posted by James Battle on May 15, 2002; 1:46pm
URL: http://quantlib.414.s1.nabble.com/Language-war-tp2066.html

This is my first post to QuantLib, hence I'll try not and create a language war
(OK I will, I can't help myself).
 
-------
 
C++ is a great language for quantitative work and for QuantLib; having used it
since early AT&T versions, I still love it.
 
I'd love to say the same for Java, but the performance just isn't there.  For doing
anything serious numerical (e.g. root finding, BLAS III etc) the performance is
terrible and the memory usage is huge.  I don't generally discriminate, purely
on performance, preferring good design, but in fields such as finance you have
to be practical.  I don't consider Java usabe for numerical work.
 
On the other hand, it is worth checking out VB.net and C# in the VC7/IDE.  C#
is a fantastic language and along with over 20 languages, compiles to a common
machine language.
 
It's also great for building complex object models.  Our FpML 3 implementation
has over 200 classes and over 100K lines of code.  It compiles in about 5 seconds
compared to 5 minutes for the C++ version.
 
Not yet complete, but I've been running some timings on a Mersenne Twister
RNG and a LINPACK benchmark. I'm not seeing significant diffs between C#,
VB and C++. 
 
Regards,
 
James Battle