Article View: comp.lang.forth
Article #60Re: Pairwise dot product
From: Anton Ertl
Date: Sun, 11 Oct 2026 15:01
Date: Sun, 11 Oct 2026 15:01
28 lines
2484 bytes
2484 bytes
Paul Rubin <no.email@nospam.invalid> writes:
>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>> But given that the stride can be anything, vectorizing V* is not
>> profitable, so gcc does not do it. One could special-case unit stride
>> to get at least that case vectorized, but the benchmark I used does
>> not use unit stride.
>
>Maybe it would also benefit at stride=2 or (especially in single
>precision) stride=4.
Probably not with AVX, but AVX512 has control over which lanes are
active, and special-casing for other strides may be profitable for
that, too.
>I didn't realize stride!=1 was commonly used for
>dot-product-like operations.
In the "normal" matrix multiplication algorithm that uses the
dot-product as component, one of the vectors strides across rows and
the other across columns. So one of them is certainly not 1. But
nobody in his right mind uses that algorithm directly.
- 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 2026 CFP: http://www.euroforth.org/ef26/cfp.html
Technical Details
Message-ID:
<2026Oct11.170130@mips.complang.tuwien.ac.at>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> <87ld882afn.fsf@nightsong.com> <2026Oct9.002856@mips.complang.tuwien.ac.at> <87h5iv36p4.fsf@nightsong.com> <2026Oct9.083242@mips.complang.tuwien.ac.at> <87cxti33o8.fsf@nightsong.com>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: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.lang.forth Subject: Re: Pairwise dot product Date: Sun, 11 Oct 2026 15:01:30 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 28 Message-ID: <2026Oct11.170130@mips.complang.tuwien.ac.at> References: <2026Oct8.175513@mips.complang.tuwien.ac.at> <87ld882afn.fsf@nightsong.com> <2026Oct9.002856@mips.complang.tuwien.ac.at> <87h5iv36p4.fsf@nightsong.com> <2026Oct9.083242@mips.complang.tuwien.ac.at> <87cxti33o8.fsf@nightsong.com> Injection-Date: Sun, 11 Oct 2026 15:09:10 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2865896"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185jCMPiqUo7kG7W+QlewOO"; posting-host="048ebf825c3e0ead5be8fd534130ebc5" Cancel-Lock: sha1:K6BtHBe6Mepz1yGgoLBAEvCBJLo= sha256:RJyiqc5xZy/OVYwsvGBIkBdF9d17xoRmGGa7Ff4BJao= sha1:LkM7a9/SnvMxgcnbEsQWpWwl29k= sha256:W+0Oz62/AZhKHn0qHa4RyHyV9mPyxFZSPGI8qxb10hQ= X-newsreader: xrn 10.11