🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #502

Re: interrupt handling latency and weird register use (was Re: OT: Epic RISC-V rant)

#502
From: Terje Mathisen
Date: Sun, 01 Nov 2026 08:02
20 lines
2553 bytes
Thomas Koenig wrote:
> Terje Mathisen <terje.mathisen@tmsw.no> schrieb:
> 
>> The correct way here is to have a function pointer that initially points
>> at a thunk which checks (CPUID) the local cpu and then updates the
>> pointer to go directly to the optimized version.
> 
> gfortran does that for calling different versions of matmul
> compiled with different flags.
> 
I re-invented this technique for my final (?) word count version, it has 
4-5 different kernels plus a benchmarking startup: Measure the speed for 
a 4KB block of input, testing every kernel, then patch the pointer to go 
directly to the fastest.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"
Technical Details
Message-ID: <11c6rlr$1pq94$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-mail
References: <87qzk0nejz.fsf@nightsong.com> <116d89d$27baf$1@paganini.bofh.team> <87ecfcagiw.fsf_-_@debian> <2026Sep1.225146@mips.complang.tuwien.ac.at> <11bpfm8$190ap$1@dont-email.me> <2026Oct27.171414@mips.complang.tuwien.ac.at> <1793120789-5857@newsgrouper.org> <11bsq36$36q1t$3@paganini.bofh.team> <1793202439-5857@newsgrouper.org> <ygnwlr084yt.fsf@y.z> <1793320218-5857@newsgrouper.org> <ygnjymy5uo2.fsf@y.z> <11c469p$u1at$1@dont-email.me> <11c50nc$175qm$1@dont-email.me>

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: Terje Mathisen <terje.mathisen@tmsw.no>
Newsgroups: comp.arch
Subject: Re: interrupt handling latency and weird register use (was Re: OT:
 Epic RISC-V rant)
Date: Sun, 1 Nov 2026 09:02:06 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <11c6rlr$1pq94$1@dont-email.me>
References: <87qzk0nejz.fsf@nightsong.com>
 <116d89d$27baf$1@paganini.bofh.team> <87ecfcagiw.fsf_-_@debian>
 <2026Sep1.225146@mips.complang.tuwien.ac.at> <11bpfm8$190ap$1@dont-email.me>
 <2026Oct27.171414@mips.complang.tuwien.ac.at>
 <1793120789-5857@newsgrouper.org> <11bsq36$36q1t$3@paganini.bofh.team>
 <1793202439-5857@newsgrouper.org> <ygnwlr084yt.fsf@y.z>
 <1793320218-5857@newsgrouper.org> <ygnjymy5uo2.fsf@y.z>
 <11c469p$u1at$1@dont-email.me> <11c50nc$175qm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 01 Nov 2026 08:02:05 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1894692"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19DOCZsuSkyWCDf1/XZPwxAnll73ux7RCEsb6UePw82hQ=="; posting-host="3ee57fb2a67e8b8c9e26e31761313105"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101
 Firefox/140.0 SeaMonkey/2.53.24
Cancel-Lock: sha1:hRpLZmn5xtNiFvYNrlU0BShVkig= sha256:VH+T2ahfK0R3HmadxL8b0c02lh+Dlxc4G32+N3rhPfM=
	sha1:XkljNi5q+8nEw2gulbx8QtXvcB4= sha256:RRG0jkDT8B7I7YndOavQg3HRf8kks4GUpfA0BhtqEgo=
In-Reply-To: <11c50nc$175qm$1@dont-email.me>