🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.forth
Article #387

Re: Request: FORTH (or basic compiler) for Apple IIe

#387
From: The Doctor
Date: Thu, 11 Sep 1986 13:50
40 lines
2517 bytes
> I have a friend doing experiment control / data acquisition with an
> apple II but finds basic too slow (big surprise).
> 
> What are some forths for the apple and their pros/cons/prices.
> Or alternatively a compiler for basic.
> 
> 	Thanks
> 		Phil Budne
> 		Boston University / Distributed Systems

Paul Lutus, I believe has put out a version of FORTH called graForth. As
The name implies, it is a graphics-oriented package.  It seems to be pretty
well put together, but might not be able to provide the speed you need.
You might try asking the company for some benchmarks.

Most BASIC compilers advertise that they can produce code up to 2 to 20
times as fast.  My own experience is that the new code becomes faster in
inverse proportion to how well you wrote the original code.  Sloopy code
can be sped up quite a bit.  Very tight original code can't.

I wrote a 27 line non-recursive solution to the knight's tour problem in
BASIC (purely as a mental exercise) in very efficient code.  It moved at
a pretty fair clip.  The compiled code went about 2-3 times as fast.
As a final task, I wrote the same code, using the same technique and style
in assembly language and was left with a program that was about 1/2 the size
in bytes, of the original BASIC, and about 1/8 the size of the compiled code
(including its libraries), and as a final note, it went 400 times faster
than the compiled code. Yes, that's right, 400. The reason for that is the
style of programming used for array addressing, and the output in assembly
language was far more efficient.

Oh, forgot to mention, graForth does not support floating point arithmetic.

If you can stomach assembly language, its the only way you'll get top
speed.  Forth is fairly swift.  Th BASIC compilers will offer you a way
to translate what you already have into inefficient assembly language at the
cost of space.

Steve Hawley
joevax!sdh
Technical Details
Message-ID: <271@joevax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!husc6!panda!genrad!decvax!bellcore!petrus!magic!joevax!sdh
References: <1261@curly.ucla-cs.ARPA>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!husc6!panda!genrad!decvax!bellcore!petrus!magic!joevax!sdh
From: sdh@joevax.UUCP (The Doctor)
Newsgroups: net.lang.forth,net.micro.apple
Subject: Re: Request: FORTH (or basic compiler) for Apple IIe
Message-ID: <271@joevax.UUCP>
Date: Thu, 11-Sep-86 09:50:09 EDT
Article-I.D.: joevax.271
Posted: Thu Sep 11 09:50:09 1986
Date-Received: Thu, 11-Sep-86 21:49:17 EDT
References: <1261@curly.ucla-cs.ARPA>
Organization: Bell Communications Research Inc., Morristown, NJ
Lines: 40