Thread View: net.lang.forth
2 messages
2 total messages
Started by Philip Budne
Sat, 06 Sep 1986 02:25
Request: FORTH (or basic compiler) for Apple IIe
Author: Philip Budne
Date: Sat, 06 Sep 1986 02:25
Date: Sat, 06 Sep 1986 02:25
9 lines
805 bytes
805 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
Re: Request: FORTH (or basic compiler) for Apple IIe
Author: The Doctor
Date: Thu, 11 Sep 1986 13:50
Date: Thu, 11 Sep 1986 13:50
40 lines
2517 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads