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=0.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e28ffe0eaf31d1b6 X-Google-Attributes: gid103376,public From: "James B. White, III (Trey)" Subject: Re: Ada vs C++ (Expression Templates) Date: 1997/09/08 Message-ID: <3413FFA6.D4D@osc.edu>#1/1 X-Deja-AN: 270712879 References: <34090462.4652@easystreet.com> <340C47F8.670B@osc.edu> Organization: Ohio Supercomputer Center Newsgroups: comp.lang.ada Date: 1997-09-08T00:00:00+00:00 List-Id: Robert Dewar wrote: > You say that you can produce wonderful interfaces with this amazing > capability. What is interesting is to look at such an interface, and > then ask how that interface would be reflected and implemented in > other languages. I have done exactly this. I started with a small sample calculation used as an example in an article on expression templates. I implemented the example in Ada using many techniques. I'll be giving a talk at Tri-Ada on the results. > Specific examples typically show that such claims > are simply inflated and have little substance! This is what I hoped to prove! I *wanted* to show that these ugly expression templates were either unnecessary or easier to implement in Ada. Unfortunately, neither was the case. In my field, high-performance computing, an order of two difference in performance is significant. For Ada implementations that created the desired interface, the execution times were more like three times those of C++ with expression templates. And the nature of the example calculation would tend to minimizes differences between compilers, so other examples could perform even worse! In other fields, the relative priority of performance versus ease of development isn't so skewed towards performance. I, however, am in the unfortunate situation where the performance benefits of expression templates probably outweigh the other benefits of Ada over C++. -- James B. White, III (Trey) Ohio Supercomputer Center trey@osc.edu Phone: (614)292-9291 Fax: (614)292-7168