home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.compilers
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!gumby!yale!mintaka.lcs.mit.edu!spdcc!iecc!compilers-sender
- From: dbenn@leven.appcomp.utas.edu.au (David Benn)
- Subject: Re: Why is compiled basic slower than C? (Basic is the future)
- Reply-To: dbenn@leven.appcomp.utas.edu.au (David Benn)
- Organization: University of Tasmania at Launceston
- Date: Sat, 15 Aug 1992 03:00:47 GMT
- Approved: compilers@iecc.cambridge.ma.us
- Message-ID: <92-08-080@comp.compilers>
- References: <92-08-064@comp.compilers> <92-08-049@comp.compilers>
- Keywords: Basic, performance
- Sender: compilers-sender@iecc.cambridge.ma.us
- Lines: 29
-
- In the discussion about BASIC compilers thus far, a recurring theme seems
- to have emerged, namely the problem of managing BASIC's run-time dynamics.
-
- I have been writing a compiler based loosely on AmigaBASIC - a Microsoft
- derivative - for the best part of a year now, and have naturally had to
- deal with these kind of issues. Re: strings memory allocation, I have
- compromised. Strings in ACE have a default length of 1K. Small, I know.
- However, the programmer can optionally declare a variable of any type
- including strings. The only non-optional declarations are for arrays. With
- strings, the programmer can specify smaller (say 100 bytes or less) or
- larger strings (limited only by available memory). For many applications,
- 1K is ample. Indeed, 512 bytes is often enough, and I may yet reduce the
- default to that. I know that many of you are thinking, "geez what a waste
- of memory." I concede that it is not by any means optimal, but it does
- avoid having to worry about garbage collection. More importantly, it works
- quite well!
-
- By the way, if you are interested, I hope to have ACE in the PD sometime
- in the next few months. It has everything from simple BASIC stuff to
- structures, pointers, turtle graphics, powerful sound and wave statements,
- case...end case etc.
-
- Regards...
- --
- dbenn@leven.appcomp.utas.edu.au
- David Benn - Applied Computing, University of Tasmania at Launceston.
- --
- Send compilers articles to compilers@iecc.cambridge.ma.us or
- {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.
-