Re: OOS approach revisited

Liste des GroupesRevenir à cl forth 
Sujet : Re: OOS approach revisited
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forth
Date : 24. Jun 2025, 14:28:13
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <84d259e0f1d6210d84c7840af5d51f4ebdd71ed4@i2pn2.org>
References : 1
User-Agent : Mozilla Thunderbird
On 23/06/2025 3:09 pm, LIT wrote:
1 VARIABLE X
2 VARIABLE Y
3 VARIABLE Z
 
: TEST1 1000 0 DO 10000 0 DO  X @ Y @ + Z !  LOOP LOOP ; ok
: TEST2 1000 0 DO 10000 0 DO  X Y Z +>  LOOP LOOP ; ok
TICKS TEST1 TICKS 2SWAP DMINUS D+ D. 121 ok
TICKS TEST2 TICKS 2SWAP DMINUS D+ D. 71 ok
 
: TEST1 1000 0 DO 10000 0 DO  1 X +! 1 Y +! X @ Y @ + Z !  LOOP LOOP ;
ok
: TEST2 1000 0 DO 10000 0 DO  X ++ Y ++  X Y Z +>  LOOP LOOP ; ok
TICKS TEST1 TICKS 2SWAP DMINUS D+ D. 217 ok
TICKS TEST2 TICKS 2SWAP DMINUS D+ D. 132 ok
 
'+>' moves a sum of two variables into body of the third one.
 
The results are rather promising, from one can see.

The saving come from rolling  @ @ + ! into a single very specialized
function.  But what about the loading of X Y and retrieving of Z which
are unavoidable in practice?  Should that not be included in the test?


Date Sujet#  Auteur
23 Jun 25 * OOS approach revisited23LIT
24 Jun 25 `* Re: OOS approach revisited22dxf
26 Jun 25  `* Re: OOS approach revisited21LIT
27 Jun 25   +* Re: OOS approach revisited19minforth
27 Jun 25   i+* Re: OOS approach revisited14dxf
27 Jun 25   ii`* Re: OOS approach revisited13minforth
27 Jun 25   ii +* Re: OOS approach revisited3LIT
27 Jun 25   ii i`* Re: OOS approach revisited2minforth
28 Jun 25   ii i `- Re: OOS approach revisited1Stephen Pelc
28 Jun 25   ii `* LOOP (was: OOS approach revisited)9Anton Ertl
28 Jun 25   ii  +* Re: LOOP7dxf
28 Jun 25   ii  i`* Re: LOOP6sean
28 Jun 25   ii  i +* Re: LOOP4Anton Ertl
3 Jul 25   ii  i i`* Re: LOOP3minforth
7 Jul 25   ii  i i `* Re: LOOP2Gerry Jackson
7 Jul 25   ii  i i  `- Re: LOOP1minforth
29 Jun 25   ii  i `- Re: LOOP1dxf
28 Jun 25   ii  `- Re: LOOP (was: OOS approach revisited)1Anton Ertl
28 Jun 25   i+* DO..LOOP and stack shuffling (was: OOS approach revisited)3Anton Ertl
3 Jul 25   ii+- Re: DO..LOOP and stack shuffling1dxf
3 Jul 25   ii`- Re: DO..LOOP and stack shuffling1Anton Ertl
30 Jun 25   i`- Re: OOS approach revisited1Hans Bezemer
27 Jun 25   `- Re: OOS approach revisited1dxf

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal