Post #1796629
2025-12-31 00:05 UTC
Replies (6)
-
@chris@social.losno.co 2025-12-31 00:06
@thephd@pony.social But wait, I thought everyone in the 1990s and early 2000s mindset made hardware emulators complete singletons with 100% global/static state just because it was "way faster".
-
@jrose@social.belkadan.com 2025-12-31 00:14
@thephd@pony.social For the record, macOS thread-locals were notoriously slow back when I worked at Apple, because they’re hidden behind function calls in order to not make the special thread-local data register part of the ABI. I don’t know if that’s still the case, but it may be interesting for you (or someone else) to re-run on Linux. Or it may not be, I can’t imagine it’s ever going to be cheaper than the static case anyway.
-
@diegovsky@bolha.us 2025-12-31 01:16
@thephd@pony.social you're not nerdsniping me again
-
@JensGustedt@digitalcourage.social 2025-12-31 06:48
@thephd@pony.social Great! Thanks for doing this! In my recent experience with contracts, I see that optimisation quickly goes down the drain, when there are pointers involved for which the language does not provide enough knowledge for escape analysis. Even 'restrict' and 'const' do not really help in most cases, because it only restricts what the local code can do, but gives no guarantee that functions that receive the pointer will not save a copy.
-
@horenmar@mastodon.social 2025-12-31 11:07
@thephd@pony.social lambda good? Unpossible, lambda is from C++ and C++ is terribly bloated and slow.
-
@erai@furry.engineer 2025-12-31 13:42
@thephd@pony.social nice! i would expect this to also depend on the details of the abi make globals especially bad on amd64 elf because of linkage semantics. tho i guess no compiler will try to optimize away a global anyway