From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 30 Apr 93 17:18:18 GMT From: news.crd.ge.com!e7sa!groleau@uunet.uu.net (Wes Groleau X7574) Subject: Re: ADA performance Message-ID: List-Id: There is a saying that the first step in learning to do genealogy is learning to spell it (A little teasing about the subject line). Seriously, y'all had good responses about the performance problem. One more factor, though: To expand and generalize on the comments about a) size of floats, b) use or non-use of co-processor, c) built-in abstraction vs. hand-coded abstraction -- Some computers (such as the high-end VAXen) and some co-processors have complex as a simple data type. In such a system, a complex multiplication may be a single instruction: certainly more efficient than four floating point multiplications and two floating point multiplications i.e. (a+bi)*(c+di) = [ac-bd]+[ad+bc]i where the + outside the brackets doesn't count. Probably one complex add is probably more efficient even than two ( [a+c] + [b+d]i ). Any optimizer smart enough to recognize the Ada record or two-float versions as a complex operation is probably smart enough to recognize complex operations where there aren't any. All four of these reasons (a, b, c, and mine are why many compiler vendors provide complex math packages. Some of these vendor packages use assembler or pragma INTERFACE for the body. Verdix, unfortunately, uses the Ada record approach with the body in Ada. (Also, there is a coding error and a STUPID design error in the Verdix complex package--e-mail me if you can't find it.) Conclusions: 1. Don't compare two compilers by using non-equivalent code. 2. RTFM - with Verdix, you have to read it VERY carefully to find out they have a complex math package. Wes G. (Back to our regularly scheduled info-mercial about marketing Ada.)