home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / forth / 3652 next >
Encoding:
Text File  |  1992-12-21  |  2.1 KB  |  53 lines

  1. Newsgroups: comp.lang.forth
  2. Path: sparky!uunet!gumby!destroyer!sol.ctr.columbia.edu!venezia!penev
  3. From: penev@venezia (Penio Penev)
  4. Subject: Re: native FORTH for R3000/IRIX available /beta/ (was Re: forth+)
  5. References: <1992Dec14.130553.11948@sol.ctr.columbia.edu>
  6. Sender: nobody@ctr.columbia.edu
  7. Organization: Rockefeller University
  8. Date: Mon, 21 Dec 1992 13:03:07 GMT
  9. X-Newsreader: TIN [version 1.1 PL6]
  10. Message-ID: <1992Dec21.130307.16311@sol.ctr.columbia.edu>
  11. Reply-To: penev@venezia.rockefeller.edu
  12. X-Posted-From: venezia.rockefeller.edu
  13. NNTP-Posting-Host: sol.ctr.columbia.edu
  14. Lines: 37
  15.  
  16. I received feedback from several people and think, that the following
  17. may be of somewhat more general interest.
  18.  
  19. This FORTH (pF) is direct threaded. The incetive is to be able to mix
  20. word calls and direct assembler, which will allow optimisation. One
  21. reference to a word is 2 intructions (8 bytes). The call is executed
  22. in 2 clocks. The branch delay slot is utilised. The return from a CODE
  23. word is 2 clocks, the return from a : word is 4 clocks, the branch
  24. delay slots being utilised.
  25.  
  26. The kernel is written in assembler, which means that it is optimised.
  27. In general it is fairly easy to write the optimal code for this
  28. processor. Almost all delay slots are utilised, very few and
  29. unimportant ones are not. To my surprise, there are no lengthy pipe
  30. refils after a branch. If the branch is at time T, the branch delay
  31. slot istruction is at T+1, and the instruction at the destination is
  32. at T+2. That means, that the fastest empty loop can be done for
  33. 2 clocks/iteration. 
  34.  
  35. I have not made optimisation yet. DUP, DROP, SWAP, @, C@, R>, >R
  36. compile directly inline, but without optimisation. This should be
  37. possible in general. My notion is that the time critical portions
  38. should be written in assembler anyway. OK, that depends on what is
  39. time critical.
  40.  
  41. I have not made measurements to see exactly how much faster is it, but
  42. I'll do some soon. It target compiles itself for ~ 5 seconds on a 
  43. 33 MHz R3000. 
  44.  
  45. Once again, feel free to request it from me, I'll send it to You. Any
  46. comments and suggestions are welcome.
  47.  
  48. -- Penio.
  49.  
  50.  
  51.  
  52.  
  53.