Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: Is there a free version of Forth that uses the exact same words as "Starting Forth" on Forth Inc.'s site? Date: Mon, 10 Apr 2017 19:42:59 -0700 Organization: A noiseless patient Spider Lines: 43 Message-ID: <87pogjpsuk.fsf@nightsong.com> References: <4403f2de-29ba-44dd-acaf-639949d0e3c8@googlegroups.com> <7e93440d-5020-4f4c-bdc6-8666e2b1f975@googlegroups.com> <2017Apr9.161649@mips.complang.tuwien.ac.at> <87vaqd8fwn.fsf@nightsong.com> <2017Apr10.081959@mips.complang.tuwien.ac.at> <87y3v767ct.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="607d379701e22f98b32edec84c604265"; logging-data="20899"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pflB2V8ot++bQ/Jph1fuJ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:YVLwupx7xQoAJkjHz/iH881rXck= sha1:csxU9+SnBxXmS5yjjlP8gHQdgGU= Xref: csiph.com comp.lang.forth:57034 Paul Rubin writes: > The compiler is the only difference I can think of. Your machine is a > little faster than mine, and mine doesn't have an SSD. Ok, I built the current version from git and ran this benchmark: : bm ( n -- ) 0 swap 0 do i + loop ; : fcputime ( - f f ) cputime d>f d>f fswap ; : tbm ( -- ) fcputime { F: user F: sys } 1e9 f>s bm fcputime sys f- fswap user f- f. f. drop cr ; tbm bye Results (Intel i7-3770, Debian 7): Git head, gcc 6.1.0: $ ./gforth-fast /tmp/bench.fs 2076130. 0. $ ./gforth /tmp/bench.fs 2436152. 0. $ ./gforth-itc /tmp/bench.fs 3556222. 0. Gforth 0.7.0 included with debian 7: $ gforth-fast ./bench.fs 2312145. 0. $ gforth ./bench.fs 3236202. 0. $ gforth-itc ./bench.fs 3664229. 0. So there's significant speedup between versions. No idea whether Gforth differences, gcc differences, or Debian pessimizations are responsible.