A gentle critque..

Bill Baxter Bill_member at pathlink.com
Tue May 16 18:22:12 PDT 2006


In article <e4cv4j$nqu$6 at digitaldaemon.com>, Walter Bright says...
>
>Don Clugston wrote:
>
>>> About native libraries
>>> ----------------------
>>> I think the way to go is to create QUALITY native D libraries. I think 
>>> we usually overestimate the cost of porting/developing native libraries.
>> 
>> I agree. When porting a library
>> (a) there isn't any algorithm development (not much 'thinking' time 
>> required);
>> (b) it's very easy to test (you can run test cases against the original 
>> version);
>> (c) the D version is frequently greatly superior to the original.
>
>Hmm. Is there a 'canonical' Fortran numerics library with a solid test 
>suite that could be translated to D as a showcase project?


BLAS?  (Basic Linear Algebra Something-er-other) It's a set of very low-level
routines for doing things like dot products and vector multiply-adds.

LAPACK? Basic linear algebra functions like LU decompostion and the like.

Lapack (and lots of other numerical libraries) rely on BLAS for low level array
operations.  The idea is that BLAS libraries can be highly tuned for particular
architectures by particular vendors, taking into account things like cache sizes
or special vector instructions.  ATLAS is the canonical example of such a tuned
BLAS library.  Given an optimized BLAS library then your LAPACK or whatever
should also run pretty fast without having to specifically tune it for each
architecture individually.

Not sure what porting either of those would showcase about D, though.  Their
interfaces are very basic,  consisting of just a set of cryptically named
functions to fit within ridiculous character limit of the original fortran
compilers.  It's about as far away as you can get from a modern, easy-to-use
API.

Porting (or reimplementing the concepts of) something like Blitz++ may be a
better showcase for D.   But I wouldn't know.  I've never used Blitz++ despite
the hype.  It simply wouldn't compile with my compiler back when I was
interested in trying it out.

At any rate, any work on porting/writing a big numerical library should probably
hold off until this new array stuff gets added to D.

Regards,

Bill Baxter



More information about the Digitalmars-d mailing list