TIP: Click on subject to list as thread! ANSI
echo: locsysop
to: Paul Edwards
from: Bob Lawrence
date: 1996-11-06 08:10:28
subject: Special Requests

BL> Eh? I was comparing Pascal and ASM, looking at the runtime
 BL> library

 PE> You were saying that Pascal was better than C, before.

  No... C is better than Pascal. Any fool knows that if you concern
yourself with the last 20%. I said that Pascal made smaller EXEs and
is fast. Which is does and is.

 PE> I told you to compare the object code (which would show you to
 PE> be wrong).

  I will concede that C compiles to better machine language, on the
basis that Frank, who is far more expert than I will ever be, and a
greater Pascal fanatic, conceded that point himself. All I said was
that Pascal did a surprisingly good job.

 BL> I haven't bothered to check C (seeign it won't lead me
 BL> anywhere) but from the tests Frank did with your Watcom I'd
 BL> expect C to be nearly as good as ASM.

 PE> It's certainly close enough for 99% of the program.

  Yair... thats what Frank said, and coming from where he is that's
good enough for me. In the little work I've done, it seems to me that
Pascal is about 20% short of the full load on average. To me, that's a
miracle, and negligible... the difference between a Perntium 160 and a
133. 

... [later]

  I was having a look at Neils' idea of a CRC as a virus protection
for files, so I dusted off my Pascal CRC code and CRC'd a big file.
Wow! Whatta shock!

  Reading the file gives 1.2Mb/sec (72Mb/min) on my hard disc.
  Doing a Pascal CRC32 gives 0.24Mb/sec (14Mb/min).
  Your C CRC is 3-TIMES! faster! (42Mb/min)

  This was tested on a 1.6Mb file not in cache. In cache it's twice as
fast, but the ratios are about the same.

  Sheesh! So I had a look at the CRC ASM code and in Pascal it's
pathetic. It just buggers about, and is simply 3-times longer than
your C code manages.

  It looks like Pascal is going to need a little bit of help to get a
reasonable CRC32. The speed difference between C and Pascal in what
is just a mathematical manipulation of a lookup is stunning!

  This makes my 20% conclusion look stupid. I assume that I will be
able to find a way to make the BP7 compiler do a lot better, but it
didn't do too well straight out of the box.

Regards,
Bob
___ Blue Wave/QWK v2.12
@EOT:

---
* Origin: Precision Nonsense, Sydney (3:711/934.12)
SEEN-BY: 711/934 712/610
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.