Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!oliveb!pyramid!athertn!paul From: paul@athertn.Atherton.COM (Paul Sander) Newsgroups: comp.sys.apple Subject: Re: P-Code System Summary: Run-time support need not be large Message-ID: <5023@athertn.Atherton.COM> Date: 2 Jun 89 20:11:31 GMT References: <8905311619.AA04801@crash.cts.com> Organization: Atherton Technology, Sunnyvale, CA Lines: 34 In article <8905311619.AA04801@crash.cts.com>, nelson@pro-europa.cts.com (Nelson Minar) writes: > What are the performance characteristics of a P-System? Isn't the kernal > rather large? What sort of ballpark execution speed are we talking? Maybe 50% > of assembled code? Runtime support need not be large. No matter what we write, we'd need things like multiple-precision arithmetic (on a 6502, even 16-bit adds are double precision, but we all know that), string I/O, and so on. None of these things by themselves is large, and everything put together is only a couple of Kbytes. For example, Fig-Forth runs in less that 8K, I think, and I've implemented a Pascal subset that uses a P-code interpreter that runs around 4K (unoptimized). I've made no attempt to measure performance, but for what I do with the stuff the performance is reasonable (maybe even fast). > Also, I know there are a couple of P-Systems already out there - Beagle Basic, > various Pascals. Any sort of P-system source code one could use (legally) as a > starting point? Try checking Byte's back issues. August 1978 (I believe) contained the first of three articles that implemented a Pascal subset compiler in BASIC that produced P-code. Also included are Pascal source for a debugger, and some other stuff like loophole optimization techniques. Perhaps someone could use that as a starting point (with the articles' author's permission, of course). > toth's point is well taken - a slow system is better than no system. There are times when slow systems are worse than useless (i.e. manual systems are faster and work better for the task at hand) but IMHO this is not one of them. -- Paul Sander (408) 734-9822 | If a machine is powerful enough paul@Atherton.COM | to have a DWIM button, why bother {decwrl,sun,pyramid}!athertn!paul | with the button? -- Eric Black