Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

fortune: cpu time/usefulness ratio too high -- core dumped.


devel / comp.lang.forth / benchmark timings with gforth 0.7.3

SubjectAuthor
* benchmark timings with gforth 0.7.3none
+- Re: benchmark timings with gforth 0.7.3Anton Ertl
`* Re: benchmark timings with gforth 0.7.3Marcel Hendrix
 `- Re: benchmark timings with gforth 0.7.3Anton Ertl

1
benchmark timings with gforth 0.7.3

<nnd$20703c9d$3a9300ed@db33036e01fcca33>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18239&group=comp.lang.forth#18239

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: benchmark timings with gforth 0.7.3
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$20703c9d$3a9300ed@db33036e01fcca33>
Organization: KPN B.V.
Date: Tue, 07 Jun 2022 18:50:25 +0200
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 43
Injection-Date: Tue, 07 Jun 2022 18:50:25 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2294
 by: none - Tue, 7 Jun 2022 16:50 UTC

I have a benchmark with the infamous byte benchmark repeated 10000
times.

The timings with mpeforth,swiftforth,lina and optimised-lina and gforth-fast
are reasonably reproducible, say at most 10 percent, Mo sly better.
E.g.
time 2>&1 nice -20 gforth-fast ./sieve10k.frt
give 3.3 seconds on my AMD 64 bit 4Ghz, all the time.

However
time 2>&1 nice -20 gforth ./sieve10k.frt
gives 6.5 seconds and then the second time e.g. 4.2 seconds.

What makes gforth 0.7.3 behave differently?

groetjes Albert

P.S. a typical testoutput is
lina plain
4.90user 0.00system 0:04.91elapsed 99%CPU (0avgtext+0avgdata 1348maxresident)k
0inputs+0outputs (0major+87minor)pagefaults 0swaps
gforth plain
5.97user 0.00system 0:05.97elapsed 99%CPU (0avgtext+0avgdata 3104maxresident)k
0inputs+0outputs (0major+399minor)pagefaults 0swaps
gforth fast
3.33user 0.00system 0:03.34elapsed 99%CPU (0avgtext+0avgdata 3068maxresident)k
0inputs+0outputs (0major+342minor)pagefaults 0swaps
lina optimised
$Revision: 1.21 $
0.88user 0.00system 0:00.88elapsed 99%CPU (0avgtext+0avgdata 1348maxresident)k
0inputs+0outputs (0major+84minor)pagefaults 0swaps
swiftforth
0.88user 0.00system 0:00.88elapsed 99%CPU (0avgtext+0avgdata 1876maxresident)k
0inputs+0outputs (0major+216minor)pagefaults 0swaps
mpeforth
0.69user 0.00system 0:00.69elapsed 100%CPU (0avgtext+0avgdata 1780maxresident)k
0inputs+0outputs (0major+2128minor)pagefaults 0swaps
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Re: benchmark timings with gforth 0.7.3

<2022Jun8.140556@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18253&group=comp.lang.forth#18253

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: benchmark timings with gforth 0.7.3
Date: Wed, 08 Jun 2022 12:05:56 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 38
Message-ID: <2022Jun8.140556@mips.complang.tuwien.ac.at>
References: <nnd$20703c9d$3a9300ed@db33036e01fcca33>
Injection-Info: reader02.eternal-september.org; posting-host="b5c02e45224817f3fcdbb2c896834116";
logging-data="18731"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nnePrxOV8i0CNQK8qGLh4"
Cancel-Lock: sha1:qZ4J6JJVEiRA4EzSdt9UYkGIkpI=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 8 Jun 2022 12:05 UTC

albert@cherry.(none) (albert) writes:
>I have a benchmark with the infamous byte benchmark repeated 10000
>times.
>
>The timings with mpeforth,swiftforth,lina and optimised-lina and gforth-fast
>are reasonably reproducible, say at most 10 percent, Mo sly better.
>E.g.
>time 2>&1 nice -20 gforth-fast ./sieve10k.frt
>give 3.3 seconds on my AMD 64 bit 4Ghz, all the time.
>
>However
>time 2>&1 nice -20 gforth ./sieve10k.frt
>gives 6.5 seconds and then the second time e.g. 4.2 seconds.
>
>What makes gforth 0.7.3 behave differently?

Nothing particular to gforth-0.7.3 that I can think of.

One thing that I can think of, but that would affect everything is if
you are using a CPU with SMT (aka Hyperthreading). If another thread
runs on the same core, this tends to slow down your thread while still
seeming to take 100% CPU time (unlike classic OS time-multiplexing of
CPUs, where you get a longer elapsed time, but roughly the same user
and system time for running the same job while competing with another
job for CPU resources.

>gforth plain
>5.97user 0.00system 0:05.97elapsed 99%CPU (0avgtext+0avgdata 3104maxresident)k
>0inputs+0outputs (0major+399minor)pagefaults 0swaps

user=elapsed means that gforth ran exclusively on the thread.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: http://www.euroforth.org/ef22/cfp.html

Re: benchmark timings with gforth 0.7.3

<a292fd44-bce8-41f3-97a7-d58c9c2531b8n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18259&group=comp.lang.forth#18259

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:7d55:0:b0:305:732:680b with SMTP id h21-20020ac87d55000000b003050732680bmr1156786qtb.391.1654694418140;
Wed, 08 Jun 2022 06:20:18 -0700 (PDT)
X-Received: by 2002:a37:a757:0:b0:6a6:8f5f:3af2 with SMTP id
q84-20020a37a757000000b006a68f5f3af2mr19730205qke.49.1654694417981; Wed, 08
Jun 2022 06:20:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 8 Jun 2022 06:20:17 -0700 (PDT)
In-Reply-To: <nnd$20703c9d$3a9300ed@db33036e01fcca33>
Injection-Info: google-groups.googlegroups.com; posting-host=131.155.124.133; posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 131.155.124.133
References: <nnd$20703c9d$3a9300ed@db33036e01fcca33>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a292fd44-bce8-41f3-97a7-d58c9c2531b8n@googlegroups.com>
Subject: Re: benchmark timings with gforth 0.7.3
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Wed, 08 Jun 2022 13:20:18 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2117
 by: Marcel Hendrix - Wed, 8 Jun 2022 13:20 UTC

On Tuesday, June 7, 2022 at 6:50:29 PM UTC+2, none albert wrote:
> I have a benchmark with the infamous byte benchmark repeated 10000
> times.
>
> The timings with mpeforth,swiftforth,lina and optimised-lina and gforth-fast
> are reasonably reproducible, say at most 10 percent, Mo sly better.
> E.g.
> time 2>&1 nice -20 gforth-fast ./sieve10k.frt
> give 3.3 seconds on my AMD 64 bit 4Ghz, all the time.
>
> However
> time 2>&1 nice -20 gforth ./sieve10k.frt
> gives 6.5 seconds and then the second time e.g. 4.2 seconds.
>
> What makes gforth 0.7.3 behave differently?
[..]

I don't know about Gforth, but I have had problems with power saving
schemes on Windows. The typical (non-high-performance) scheme
leads to disks being send to sleep (sometimes seconds delay). Even
when that is not the case, the performance is about 50% of what is
possible.
There is of course also a cache effect if there is not enough memory.

What happens if you run the test more than twice (say 10 times)?

-marcel

Re: benchmark timings with gforth 0.7.3

<2022Jun8.162705@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18268&group=comp.lang.forth#18268

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: benchmark timings with gforth 0.7.3
Date: Wed, 08 Jun 2022 14:27:05 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 38
Message-ID: <2022Jun8.162705@mips.complang.tuwien.ac.at>
References: <nnd$20703c9d$3a9300ed@db33036e01fcca33> <a292fd44-bce8-41f3-97a7-d58c9c2531b8n@googlegroups.com>
Injection-Info: reader02.eternal-september.org; posting-host="b5c02e45224817f3fcdbb2c896834116";
logging-data="27438"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UH3bWAuhc5WuP9LQtSPRV"
Cancel-Lock: sha1:ZGGzNorzRQvYV3JFvbJzY0yE94g=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 8 Jun 2022 14:27 UTC

Marcel Hendrix <mhx@iae.nl> writes:
>On Tuesday, June 7, 2022 at 6:50:29 PM UTC+2, none albert wrote:
>> I have a benchmark with the infamous byte benchmark repeated 10000
>> times.
>>
>> The timings with mpeforth,swiftforth,lina and optimised-lina and gforth-fast
>> are reasonably reproducible, say at most 10 percent, Mo sly better.
>> E.g.
>> time 2>&1 nice -20 gforth-fast ./sieve10k.frt
>> give 3.3 seconds on my AMD 64 bit 4Ghz, all the time.
>>
>> However
>> time 2>&1 nice -20 gforth ./sieve10k.frt
>> gives 6.5 seconds and then the second time e.g. 4.2 seconds.
>>
>> What makes gforth 0.7.3 behave differently?
>[..]
>
>I don't know about Gforth, but I have had problems with power saving
>schemes on Windows.

Good point. CPUs these days don't just run at 4GHz. Instead, it
depends on a number of factors, including how CPU-intensive the job is
(should not be a problem in this case), how many other cores are
loaded, the total power consumption, and the temperature of the CPU.
That's one reason why I like to measure cycles rather than seconds for
CPU-intensive stuff like this.

>There is of course also a cache effect if there is not enough memory.

The Byte sieve that he measured should easily be within the L1 cache.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: http://www.euroforth.org/ef22/cfp.html

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor