home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.compilers,comp.lang.basic
- Path: sparky!uunet!think.com!spdcc!iecc!compilers-sender
- From: maniattb@cs.rpi.edu (Bill Maniatty)
- Subject: Re: Why is compiled basic slower than C? (Basic is the future)
- Reply-To: maniattb@cs.rpi.edu (Bill Maniatty)
- Organization: Compilers Central
- Date: Wed, 12 Aug 1992 20:48:27 GMT
- Approved: compilers@iecc.cambridge.ma.us
- Message-ID: <92-08-059@comp.compilers>
- References: <92-08-042@comp.compilers>
- Keywords: Basic, C, performance
- Sender: compilers-sender@iecc.cambridge.ma.us
- Lines: 31
-
- Glenn_Johansson@f313.n203.z2.fidonet.cd.chalmers.se writes:
- |> 2. Why is the basic compilers creating a slower product than the C
- |> compilers?
-
- Slower in what sense, rate of compilation, or the run time speed of
- executables generated. C requires more than one pass for compilation, and
- therefore compiles slower than Basic. Basic is much easier to compile and
- interpret than C (recall in the beginning of the PC movement Basic was the
- first higher level language for many machines, Altair, Commodore, Apple,
- IBM). The address space for a Basic interpreter/compiler is much smaller
- than for C.
-
- C is a more accurate representation of the underlying hardware, and it is
- possible for the programmer to take advantage of that knowledge. Basic is
- not a stack oriented language and cannot take advantage of the hardware
- stack the same way that 'C' can. The C programmer has access to low level
- (by that I mean close to the hardware) operations. C supports bit map
- management, pointers, compile time constant folding, the register
- qualifier etc.
-
- Also since Basic is not suitable for implementation of large projects and
- system software, much less work goes into optimization.
-
- Basic programmers just don't have the same tools at their disposal.
-
- Bill
- --
- | maniattb@cs.rpi.edu - in real life Bill Maniatty
- --
- Send compilers articles to compilers@iecc.cambridge.ma.us or
- {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.
-