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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-04 02:11:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!uio.no!newsfeed1.e.nsc.no!nsc.no!nextra.com!news.powertech.no!dax.net!juliett.dax.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X References: <6a90b886.0305262344.1d558079@posting.google.com> <3ED41344.7090105@spam.com> <3ED46D81.FF62C34F@0.0> <3ED46E07.4340CABC@0.0> <3ED4F3FD.A0EF7079@alfred-hilscher.de> <6vWcnTWjF83bD0qjXTWcpA@gbronline.com> <3EDCBDF4.1050900@attbi.com> From: Ole-Hjalmar Kristensen Message-ID: <7v3ciq5hsm.fsf@vlinux.voxelvision.no> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 04 Jun 2003 09:11:05 GMT NNTP-Posting-Host: 193.216.12.150 X-Complaints-To: abuse@tele2.no X-Trace: juliett.dax.net 1054717865 193.216.12.150 (Wed, 04 Jun 2003 11:11:05 MET DST) NNTP-Posting-Date: Wed, 04 Jun 2003 11:11:05 MET DST Organization: Tele2 Norway AS Public Access Xref: archiver1.google.com comp.lang.ada:38577 Date: 2003-06-04T09:11:05+00:00 List-Id: 18k11tm001@sneakemail.com (Russ) writes: > Well, it seems to me that such an "interesting optimization" might be > well worth doing. Then again, the "unwind" operation would obviously > depend on the definition of the "+=" operation, which could be > different for each type, so I don't see how it could be done in > general. It's done all the time in DB systems with a log. Probably not an efficient solution for a programming language, but certainly generally doable :-) > > In any case, the performance hit taken to keep A unchanged when a > Constraint_Error is raised seems rather expensive to me. If it were up > to me, I would take the factor of four better efficiency over > preserving A in the rare case of an overflow. And I'll bet most > programmers doing heavy-duty number crunching for simulation would > too. > Just turn off the checking if you are certain that your cruncher works correctly. If you are paranoid about the use of temporaries, just write an inlined "add" procedure which does the addition in place. > I know that Ada is preferable for safety-critical applications, but > based on what you are telling me, it sure seems to be a poor choice > for non-safety-critical simulation with heavy number crunching. Thanks > for clarifying that. I guess C++ is good for something after all, eh? C++ is OK for many purposes, and the C++ templates are certainly fun and flexible. For heavy number crunching I would still use Fortran because of the excellent vectorizing compilers available. For multithreaded applications Ada wins hands down. -- Ole-Hj. Kristensen ****************************************************************************** * "Premature optimization is the root of all evil" * Donald Knuth ******************************************************************************