delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/29/13:37:04

Message-ID: <000501bda384$625cc760$364e08c3@arthur>
From: "Arthur" <arfa AT clara DOT net>
To: "DJGPP Mailing List" <djgpp AT delorie DOT com>
Subject: Re: 16 bit colour !! with dgjpp
Date: Mon, 29 Jun 1998 14:37:19 +0100
MIME-Version: 1.0

>> Hello,
>> I am writing a RPG game in Pascal but I was thinking that pascal is
>> slower than C so I had a look at DGJPP.
>
> Umm.. I've been using PASCAL for 6 years and I can tell you right
>now: PASCAL and C don't differ in speeds. You can (and should) use
>nested ASM commands in both languages and as such the results are the
>same.


I've found that there is a small difference. There gap in speed between
Pascal and C has closed significantly over the past few years. C++ is about
the same speed as Pascal, with C slightly faster (depending on what parts of
C++ you use).

If you are using as fewer library functions as possible and no ASM, then C
can be clocked as significantly faster. As soon as you use ASM or library
(esp. libc) functions the gap closes. I don't know what Gili has been
coding, but for games C or C++ is better - otherwise there would be more
games coded in Pascal. Whether this is because of the features of C or the
speed, I'm not sure.

You can't beat ASM, except in terms of ease of use (mind you, if you can
program in C, ASM shouldn't be too much of a problem :^) ).

James Arthur
jaa AT arfa DOT clara DOT net

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019