Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!rochester!pt.cs.cmu.edu!a.gp.cs.cmu.edu!koopman From: koopman@a.gp.cs.cmu.edu (Philip Koopman) Newsgroups: comp.lang.forth Subject: Re: TOS in a CPU register Summary: TOS is faster, NOS is slower Keywords: chip,architecture,cache,stack,next Message-ID: <11863@pt.cs.cmu.edu> Date: 9 Feb 91 15:32:09 GMT References: <1134@pcsbst.pcs.com> <1991Feb9.032229.2276@isis.cs.du.edu> Organization: Carnegie-Mellon University, CS/RI Lines: 23 *** This is posted as a favor to Igor Agamirzian *** Organization: Leningrad Institute for Informatics AS USSR From: Igor Agamirzian We have and experience with different implementation of the top of the stack in the AstroFORTH system for the IBM PC. In the standard system we use a hardware stack of i8086/i80286 without top on the register. Using the target compiler of the AstroFORTH, we implemented two different types of stack top: with TOS on a register and with TOS and NOS on the registers, and checked the speed on the standard banchmark tests (BYTE, 1984, v.9, No 12 and FORTH Dimensions III/1). Our result was: taking standard implementation for 100% of execution speed, we got 108% with the one register implementation, and 95% with two registers. I think, that the result shows, that handling of two register top takes more time, than the economy on readiness of the arguments for binary operations gives. Of course, theese results may differ on different types of processors, though in any case there must be a threshold of effectiveness for the number of registers for the top of the stack representation. -- -- Igor Agamirzian Office: +7(812)350-2523 Home: +7(812)314-6055 Fax: +7(812)217-5105 Address: 37 Rackova Str. # 4, Leningrad 191011 U.S.S.R.