From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,35c7a6f09461750f X-Google-Attributes: gid103376,public From: Gerald Kasner Subject: Re: Ada->C++ conversion stats? Date: 2000/03/22 Message-ID: <38D88141.4B452EBA@Physik.Uni-Magdeburg.de>#1/1 X-Deja-AN: 600765033 Content-Transfer-Encoding: 7bit References: <38D722C1.8B6C58F7@gte.net> X-Original-NNTP-Posting-Host: kasner.nat.uni-magdeburg.de X-Accept-Language: de-DE, en Content-Type: text/plain; charset=us-ascii X-Trace: 22 Mar 2000 09:15:53 +0100, loriot.cs.uni-magdeburg.de Organization: Uni Magdeburg MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-03-22T00:00:00+00:00 List-Id: Hyman Rosen wrote: > > "Robert L. Klungle" writes: > > The C++ version execution time is 3 times slower than the original Ada. > > Primarily due to the implementation of an Array (Matrix) class as a > > Class of Vectors-of-Vectors. > > This was done to keep the matrix type of referencing ([][]). There is no > > C++ operator to overload of this kind. > > In addition to the B&N book, you should also look at the Blitz++ library. > It uses the expression template technique to convert concisely written > matrix operations into the equivalent of hand-optimized loops. It's free. > See . Rather than using blitz or something like that, I would prefer libblas, which is highly tuned and available for various platforms. C bindings should be available at netlib.org. If the matrix operations are responsible for the slowness, the use of blas would give incredible speedups, even in the Ada version. -Gerald