Hash functions aren’t “impenetrable” they’re just math.
I mean, they’re both. At a high level it’s math, but the individual operations are carefully designed to resist any symbolic manipulation (aka thought) - because that’s one step away from an attack.
The point of this post is actually things like x[(I-3)&0x0f]. It’s entirely the same concept as coercion to manipulate index values this way. What’s funny is that void pointer math, function pointer math, void pointers and function pointers in general are typically seen as “beyond the pale” for whatever reason.
If it compiles pretty directly to register pointer math that way, I think it could be justified here. I can’t say if it does, or if an alternate approach would too, though.
This portion is simply an manually unrolled loop
Lol, I didn’t notice it’s a perfect shift. Yeah, that could theoretically be done better. Presumably the justification is because it’s a leaf function, and it’s hard to guarantee every compilation will unroll it properly.
(lmao these gcc nerds haven’t even heard of Gentoo)
The flag -O3 exists. Or just -funroll-loops. You shouldn’t even need -funroll-all-loops in this case, since hashes have a fixed size.
I sound way more competent with the flags than I am here, haha. Does Gentoo use an alternate compiler by default?
Beyond that asking what the memory size of a variable in C is a fools errand because the real answer is “it depends” and “it also depends if someone decided to ignore what it typically depends on (compiler and platform) with some preprocessor fun”.
As I understand it, that’s pretty unavoidable if you want C to both compile onto multiple processors and work at a high level the same way on all of them. JavaScript catches shit for doing funny things purely because it was hastily built.
Ditto for fast inverse square root. It’s absolutely cursed, but when you’re at a certain low level you can’t afford pretty anymore. You’re feeling the constraint of limited die space and manufacturing steps not too far down the layers of abstraction. Browser scripting, on the other hand, is not low-level.
Lol, good to know the guys with souped up shitty cars have been around since the early internet.
Now I’m super curious about Gentoo and Portage. You don’t hear so much about compiling your own stuff anymore (probably because there’s less architectures around).
Now I’m super curious about Gentoo and Portage. You don’t hear so much about compiling your own stuff anymore (probably because there’s less architectures around).
“Nobody” runs Gentoo anymore because most distros have taken the 80% optimizations you can do and just mainlined them. This was back in 2000’s where some distros weren’t even by default compiling with -O2. Gentoo usage just proved out that the underlying code was effectively -O3 safe in the 80% case and nobody was sneakily relying on C/C++ vagaries.
I have much less time to tinker, but my favorite new bag is Fedora Atomic (currently using Bazzite on my main desktop). I’m incredibly interested in figuring out Nix though, but I haven’t had the time. Immutable distros are honestly something incredibly useful for both power users and normies. The main issues I’ve had with Fedora Atomic have really been around vagueness in the “standard” but they’re still figuring things out as far as I can tell.
Nix is cool. My next daily driver is probably going to be Qubes, which goes in a whole other direction. I bet you can run Nix within Qubes, though.
Guix and it’s accompanying system are interesting to me for basically being Nix with Portage-style user compilation. The system is also GNU Hurd compatible and has a different approach to organising files, among other things.
I mean, they’re both. At a high level it’s math, but the individual operations are carefully designed to resist any symbolic manipulation (aka thought) - because that’s one step away from an attack.
If it compiles pretty directly to register pointer math that way, I think it could be justified here. I can’t say if it does, or if an alternate approach would too, though.
Lol, I didn’t notice it’s a perfect shift. Yeah, that could theoretically be done better. Presumably the justification is because it’s a leaf function, and it’s hard to guarantee every compilation will unroll it properly.
The flag -O3 exists. Or just -funroll-loops. You shouldn’t even need -funroll-all-loops in this case, since hashes have a fixed size.
I sound way more competent with the flags than I am here, haha. Does Gentoo use an alternate compiler by default?
As I understand it, that’s pretty unavoidable if you want C to both compile onto multiple processors and work at a high level the same way on all of them. JavaScript catches shit for doing funny things purely because it was hastily built.
Ditto for fast inverse square root. It’s absolutely cursed, but when you’re at a certain low level you can’t afford pretty anymore. You’re feeling the constraint of limited die space and manufacturing steps not too far down the layers of abstraction. Browser scripting, on the other hand, is not low-level.
This is in reference to an ancient linux meme cw: slur
Lol, good to know the guys with souped up shitty cars have been around since the early internet.
Now I’m super curious about Gentoo and Portage. You don’t hear so much about compiling your own stuff anymore (probably because there’s less architectures around).
“Nobody” runs Gentoo anymore because most distros have taken the 80% optimizations you can do and just mainlined them. This was back in 2000’s where some distros weren’t even by default compiling with
-O2
. Gentoo usage just proved out that the underlying code was effectively-O3
safe in the 80% case and nobody was sneakily relying on C/C++ vagaries.I have much less time to tinker, but my favorite new bag is Fedora Atomic (currently using Bazzite on my main desktop). I’m incredibly interested in figuring out Nix though, but I haven’t had the time. Immutable distros are honestly something incredibly useful for both power users and normies. The main issues I’ve had with Fedora Atomic have really been around vagueness in the “standard” but they’re still figuring things out as far as I can tell.
Nix is cool. My next daily driver is probably going to be Qubes, which goes in a whole other direction. I bet you can run Nix within Qubes, though.
Guix and it’s accompanying system are interesting to me for basically being Nix with Portage-style user compilation. The system is also GNU Hurd compatible and has a different approach to organising files, among other things.