Article View: comp.lang.forth
Article #44Re: Pairwise dot product
From: marcel hendrix
Date: Fri, 09 Oct 2026 07:12
Date: Fri, 09 Oct 2026 07:12
49 lines
3555 bytes
3555 bytes
On 10/9/2026 7:32 AM, Anton Ertl wrote: [..]> It does not nest definitions, so it's unclear why it should be > perceived as nested definitions. The latest iForth checks [ and ] for (not) increasing the code space in a way that night impact doing nested compilation. It gives a stack error that looks like a problem with CASE's branch generator . I will investigate further when I have time. Thanks for reporting. > Are you sure it is that problem? The same technique is used in > GEN-SUM in > > https://www.complang.tuwien.ac.at/forth/programs/pairwise-sum.4th > > and that works on iForth (at least on the 5.1-mini version I have). > For pairwise-fdot.4th iForth gave me some error that I did not > investigate further; looking at it again, both > > iforth 'create testthis include /home/anton/gforth/compat/xlocals.fs include /home/anton/forth/pairwise-fdot.4th test bye' > > and > > iforth "create benchthis include /home/anton/gforth/compat/xlocals.fs include /home/anton/forth/pairwise-fdot.4th ' pairwise-v* bench bye" > > work, so maybe the change that I made in the meantime (some words > generated by GEN-V* used to be normal colon definitions and are now > macros) makes the difference. I made a note and will recheck that code with the newest iForth. > Here are the results with iForth, which works with the current > version, on Zen4 (Ryzen 8700G): > > gf-f gf-f-v3 iForth lxf sf64 vfx64 > k cycles:u > 1_543_608 2_043_449 v* > 6_090_505 6_544_524 3_399_183 3_219_799 4_705_232 3_425_833 naive-v* > 4_355_047 4_360_980 3_850_466 4_368_398 11_998_171 1_208_370 pairwise-v* The most interesting result is the very good result of Gforth's native v* and vfx64's surprising sprint in pairwise-v*. I will recheck when my 9950 is operational. > Looking at iForth's code for VG*2, I see quite a bit of pushing and > popping going on, so apparently something prevents the register > allocator from working as well as it does on some other code. I don't see any "VG*2" in https://www.complang.tuwien.ac.at/forth/programs/pairwise-fdot.4th ? -marcel
Technical Details
Message-ID:
<11aa44u$9s7j$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<2026Oct8.175513@mips.complang.tuwien.ac.at> <11a9aah$19g75$1@dont-email.me> <2026Oct9.073240@mips.complang.tuwien.ac.at>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: marcel hendrix <mhx@iae.nl> Newsgroups: comp.lang.forth Subject: Re: Pairwise dot product Date: Fri, 9 Oct 2026 09:12:29 +0200 Organization: A noiseless patient Spider Lines: 49 Message-ID: <11aa44u$9s7j$1@dont-email.me> References: <2026Oct8.175513@mips.complang.tuwien.ac.at> <11a9aah$19g75$1@dont-email.me> <2026Oct9.073240@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 09 Oct 2026 07:12:31 +0000 (UTC) Injection-Info: dont-email.me; logging-data="323827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KGZqpdFQVQypbiTuOTotwTOf/vqHma8E="; posting-host="6d6e46262c1d841f326e811fcc4b05dc" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:ykVZRbtzmz0YbBhayBUaVmtgTcw= sha256:nMcFHM0oo6/N2EjMsg86b5r++qpompmHuaC9SnGv8wk= sha1:9LoDCqvEzXd2ply/sWwD7ze3wLM= sha256:o0mJmOKsRF0gcMNYFjB/HnARc/cEDZAXF9WK6YrmHjg= Content-Language: en-US In-Reply-To: <2026Oct9.073240@mips.complang.tuwien.ac.at>