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: Hyman Rosen Subject: Re: Ada->C++ conversion stats? Date: 2000/03/21 Message-ID: #1/1 X-Deja-AN: 600411474 Sender: hymie@calumny.jyacc.com References: <38D722C1.8B6C58F7@gte.net> X-Complaints-To: abuse@panix.com X-Trace: news.panix.com 953649053 20330 209.49.126.226 (21 Mar 2000 14:30:53 GMT) Organization: PANIX Public Access Internet and UNIX, NYC NNTP-Posting-Date: 21 Mar 2000 14:30:53 GMT Newsgroups: comp.lang.ada Date: 2000-03-21T14:30:53+00:00 List-Id: "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. You should certainly not implement (non-sparse) matrices as vectors of vectors! I would advise you to get a copy of Barton & Nackman's "Scientific and Engineering C++". There are all sorts of efficient algorithms in there for implementing matrices while preserving the [][] C++ array referencing syntax.