Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.forth    |    Forth programmers eat a lot of Bratwurst    |    117,927 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 117,541 of 117,927    |
|    albert@spenarnc.xs4all.nl to Anton Ertl    |
|    Re: DOES> speed    |
|    07 Sep 25 11:40:56    |
   
   In article <2025Sep6.164857@mips.complang.tuwien.ac.at>,   
   Anton Ertl wrote:   
   >Last year I found that the cd16sim benchmark can be sped up in   
   >gforth-fast by a factor of 3 by replacing one occurence of   
   >   
   > does> ;   
   >   
   >with   
   >   
   > ;   
   >   
      
   All buffers generated by CREATE has a DOES> pointer that can be changed.   
   That makes CREATE not the fundamental building block it is suggested to be.   
   ciforth has DATA   
   that is in effect the familiar VARIABLE but without the allocation.   
   : BUFFER DATA CELLS ALLOCATE ;   
   : VARIABLE DATA 1 CELLS ALLOCATE ;   
      
   DATA is creating a header with DOVAR as its action   
      
   A proper building block would be   
   HEADER ( name label -- dea)   
   Where the name is the created name and the label points to low level action.   
   dea is the "xt/nt" resulting. dea is a dictionary entry so that   
   other fields (data content, immediate flags etc.) can be filled in later.   
      
   DATA becomes   
    parse a name and pass a label dovar to HEADER leaving dea   
    fill in HERE as the low level data field in the dea   
    (Not to be confused by >BODY that makes only sense in the   
    context of CREATE DOES> )   
      
   Remember CDFLN (code data flags link name)   
      
   >- anton   
      
   Groetjes Albert.   
   --   
   The Chinese government is satisfied with its military superiority over USA.   
   The next 5 year plan has as primary goal to advance life expectancy   
   over 80 years, like Western Europe.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca