Re: May the numbers speak - supplement

Liste des GroupesRevenir à cl forth 
Sujet : Re: May the numbers speak - supplement
De : mhx (at) *nospam* iae.nl (mhx)
Groupes : comp.lang.forth
Date : 13. Jun 2025, 09:43:44
Autres entêtes
Organisation : novaBBS
Message-ID : <7833daedd900cdce052246e4d5e5b6c9@www.novabbs.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Rocksolid Light
On Thu, 12 Jun 2025 22:01:07 +0000, Paul Rubin wrote:

mhx@iae.nl (mhx) writes:
iSPICE> TEST TEST TEST TEST
\ dtimescan   : 2515 clock ticks elapsed, 45296
\ timestrscan : 419 clock ticks elapsed, 45296
\ HMS         : 419 clock ticks elapsed, 45296
It makes no difference. Whatever is holding it down must
be quite severe.
>
Is dtimescan the one that uses double word arithmetic for 16 bit
processors?  It's doing more stuff, I would think.  Weird that it
catches up after a few tries.  Cache warming?
The TICKS? word apparently can't be trusted under Windows 11. This
is better:
#2000000 VALUE #iters
CREATE num ," 12:34:56"
: .SECS  MS? #1000000 #iters 3 * */ ." / " . ." ns per iteration." ;
: TEST2 ( --  )
  CR
  CR ." \ dtimescan   : " TIMER-RESET num C@+
     #iters 0 ?DO  2DUP dtimescan   2DROP
                   2DUP dtimescan   2DROP
                   2DUP dtimescan   2DROP  LOOP dtimescan        UD. SECS
  CR ." \ timestrscan : " TIMER-RESET num C@+
     #iters 0 ?DO  2DUP timestrscan 2DROP
                   2DUP timestrscan 2DROP
                   2DUP timestrscan 2DROP  LOOP timestrscan      UD. SECS
  CR ." \ HMS         : " TIMER-RESET num C@+
     #iters 0 ?DO  2DUP hms          DROP
                   2DUP hms          DROP
                   2DUP hms          DROP  LOOP hms                . SECS
  CR ." \ HMS2        : " TIMER-RESET num C@+
     #iters 0 ?DO  2DUP hms2        3DROP
                   2DUP hms2        3DROP
                   2DUP hms2        3DROP  LOOP hms2  ROT . SWAP . . SECS ;
CLS TEST2 TEST2 TEST2 TEST2
\ dtimescan   : 45296 / 15 ns per iteration.
\ timestrscan : 45296 / 13 ns per iteration.
\ HMS         : 45296 / 5 ns per iteration.
\ HMS2        : 12 34 56 / 53 ns per iteration.
\ dtimescan   : 45296 / 15 ns per iteration.
\ timestrscan : 45296 / 14 ns per iteration.
\ HMS         : 45296 / 5 ns per iteration.
\ HMS2        : 12 34 56 / 53 ns per iteration.
\ dtimescan   : 45296 / 16 ns per iteration.
\ timestrscan : 45296 / 14 ns per iteration.
\ HMS         : 45296 / 5 ns per iteration.
\ HMS2        : 12 34 56 / 53 ns per iteration.
\ dtimescan   : 45296 / 15 ns per iteration.
\ timestrscan : 45296 / 14 ns per iteration.
\ HMS         : 45296 / 5 ns per iteration.
\ HMS2        : 12 34 56 / 53 ns per iteration. ok
HMS is three times faster than  dtimescan  and  timestrscan,  while
HMS2 is 3.5 times slower (as expected).
In practice, I'd use some variant of hms2.
-marcel

Date Sujet#  Auteur
11 Jun 25 * May the numbers speak32LIT
11 Jun 25 +* Re: May the numbers speak25LIT
11 Jun 25 i`* Re: May the numbers speak - supplement24LIT
11 Jun 25 i `* Re: May the numbers speak - supplement23minforth
12 Jun 25 i  `* Re: May the numbers speak - supplement22dxf
12 Jun 25 i   `* Re: May the numbers speak - supplement21Paul Rubin
12 Jun 25 i    +- Re: May the numbers speak - supplement1LIT
12 Jun 25 i    +* Re: May the numbers speak - supplement8mhx
12 Jun 25 i    i`* Re: May the numbers speak - supplement7Paul Rubin
12 Jun 25 i    i +* Re: May the numbers speak - supplement5mhx
12 Jun 25 i    i i`* Re: May the numbers speak - supplement4Paul Rubin
13 Jun 25 i    i i `* Re: May the numbers speak - supplement3mhx
13 Jun 25 i    i i  `* Re: May the numbers speak - supplement2Paul Rubin
13 Jun 25 i    i i   `- Re: May the numbers speak - supplement1mhx
13 Jun 25 i    i `- Re: May the numbers speak - supplement1dxf
12 Jun 25 i    +- Re: May the numbers speak - supplement1ahmed
12 Jun 25 i    +- Re: May the numbers speak - supplement1minforth
12 Jun 25 i    +* Re: May the numbers speak - supplement2B. Pym
12 Jun 25 i    i`- Re: May the numbers speak - supplement1Paul Rubin
12 Jun 25 i    +- Re: May the numbers speak - supplement1peter
12 Jun 25 i    `* Re: May the numbers speak - supplement6B. Pym
13 Jun 25 i     `* Re: May the numbers speak - supplement5dxf
13 Jun 25 i      +* Re: May the numbers speak - supplement3Hans Bezemer
13 Jun 25 i      i`* Re: May the numbers speak - supplement2Paul Rubin
14 Jun 25 i      i `- Re: May the numbers speak - supplement1dxf
15 Jun 25 i      `- Re: May the numbers speak - supplement1dxf
11 Jun 25 `* Re: May the numbers speak6dxf
11 Jun 25  `* Re: May the numbers speak5Hans Bezemer
12 Jun 25   +- Re: May the numbers speak1dxf
12 Jun 25   `* Re: May the numbers speak3sean
12 Jun 25    +- Re: May the numbers speak1mhx
12 Jun 25    `- Re: May the numbers speak1minforth

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal