[comp.lang.pascal] p2c benchmarks?

lamour@smiley.uucp (Michael Lamoureux) (05/30/90)

	I was just wondering if anyone has done any benchmarks on the
before & after results of p2c.  I realize that the purpose of this program
is not necessarily to increase the performance of the code, but only to
translate it.  Some people were asking if I knew if the resulting code
would run slower, equal, or faster than the original Pascal code, and by
how much (on the average).  I honestly didn't know, but was wondering if
anyone could give me some insight to this problem.
	I also imagine that compiling the resulting C code with gcc might
give it a little bit more speed.  Any ideas what this might add?

	[ The programs which are in question now run for several hours
so even a slight percentage either way would probably have a large effect ]


Please Email responses, and I'll summarize,
Thanks,

+==================================================+
| Michael Lamoureux (lamour@mitre.org)             |
| The MITRE Corporation, McLean VA  (703) 883-5370 |
+==================================================+

wilker@gauss.math.purdue.edu (Clarence Wilkerson) (05/30/90)

It produced code about 10% smaller and 20% slower on a SUN-3.
Clarence Wilkerson

jlg0805@uxa.cso.uiuc.edu (05/30/90)

Excuse me for being new in this group, but where can you get p2c?

I will appreciate it very much if some one can send me mail abt this.

J.Liang
jlg0805@uxa.cso.uiuc.edu

steve@taumet.COM (Stephen Clamage) (05/30/90)

In article <109690@linus.UUCP> lamour@mitre.org (Michael Lamoureux) writes:
>	I was just wondering if anyone has done any benchmarks on the
>before & after results of p2c ...
>Some people were asking if I knew if the resulting code
>would run slower, equal, or faster than the original Pascal code, and by
>how much (on the average).

The problem here is the tremendous variability of compilers for one
language even on the same machine.  If you look at compiler reviews in
magazines, you find multiplicative factors (not just percentages) in
speed (and size) difference.

Now you add an additional dimension by using compilers for different
languages.  One sometimes sees statements like "Pascal programs are
slower (or bigger) than C programs".  This should be restated as "my
Pascal compiler generates slower (or bigger) code than my C compiler
for this program pair."

There are language suites from some vendors where optimizer and code
generator are shared among languages, and only the front end (parser)
differs.  If you find a C/Pascal pair where the same versions of the
optimizer and back end are used, and where the implementor took the
same care in parsing both languages, you have a chance of a meaningful
comparison.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com