Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dzaima
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
43 ms
·
601.
▲
by
dzaima
2y ago
If ffmpeg can't pull together enough good SIMD developers from its thousands of contributors, then most projects won't be able to get any. Having a problem of "not enough" is already miles better the problem of "hav
602.
▲
by
dzaima
2y ago
Clang does have "-Rpass-missed=vectorize" among others.
603.
▲
by
dzaima
2y ago
The checks are done outside of the loop though (unless you mean ≥two nested loops, with a small-ish inner one, at which point things indeed get less nice, but also this is less common). Yeah, autovectorization of a manual tail loop can be a
604.
▲
by
dzaima
2y ago
Both gcc and clang check for aliasing at runtime if not provable statically for autovectorization (granted, that can fail if you have reverse/strided/gather addresses, but those are less common; and yeah it does lead to some const
605.
▲
by
dzaima
2y ago
Any modern compiler that bothers should be able to autovectorize most practical vectorizable things without issue, even without restrict. Of course there'll be some small inefficiencies or failed autovectorization sometimes, but small
606.
▲
by
dzaima
3y ago
Clang still has some alternative calling conventions via __attribute__((X)) for individual functions with a bunch of options[0], though none just extend the set of arguments passed via GPRs (closest seems to be preserve_none with 12 argumen
607.
▲
by
dzaima
3y ago
Unpacking bools is cheap - to move any bit into a flag is just a single 'test' instruction, which is as good as it gets if you have multiple bools (other than passing each in a separate flag, which is quite undesirable). Doing the
608.
▲
by
dzaima
3y ago
Given that unzip and unxz exist, untar isn't that unreasonable.
609.
▲
by
dzaima
3y ago
Of note of course is termux, which is a proper terminal, complete with a custom apt repo. For cases where an adb shell is needed (modify external storage, slightly more permissions if not rooted) it's approximately possible to just cop
610.
▲
by
dzaima
3y ago
It is still pretty relevant, as the .bat file contents can't prevent improper arguments from executing arbitrary code, whereas a #!/bin/sh file invoked with arbitrary arguments will not do any code execution other than what t
611.
▲
by
dzaima
3y ago
If a process uses the execv* methods to spawn a new process (as should most good implementations), it doesn't use /bin/sh in any way and thus itself cannot cause wrong things to happen; the spawned process could of course sti
612.
▲
by
dzaima
3y ago
The primary linux interfaces for invoking programs with arguments (both in libc and the syscall level) have each argument be its own string, so it's possible to invoke a program with arguments such that no escaping or unescaping happen
613.
▲
by
dzaima
3y ago
A couple weeks ago anyone calling Jia Tan of xz untrustworthy (without having discovered the backdoor) would have been laughed at, but apparently we're in a world where long-time maintainers of open-source projects can be malicious. An
614.
▲
by
dzaima
3y ago
The account has been suspended for a while, but for whatever reason that's not displayed on the profile itself (can be seen at https://github.com/Larhzu?tab=following ). Repo being disabled is newer, and, while annoying
615.
▲
by
dzaima
3y ago
Some self-advertising of a linux tool I made which can display perf record data with Java JIT disassembly (doesn't need hsdis): https://github.com/dzaima/grr?tab=readme-ov-file#java-jit
616.
▲
by
dzaima
3y ago
What would "leave alone" even be? There's no "default" state of performance of Java code; it would be ridiculously stupid for there to be something saying that, say, "a+b" for int type values has to take a
617.
▲
by
dzaima
3y ago
It seems the intent was for "*" to be used instead of "+". At which point it's actually undefined behavior even though the operands are unsigned!
618.
▲
by
dzaima
3y ago
This isn't about files, this is about plain pages of RAM[0]. It is a basic CPU operation to trap on unmapped pages, and OSes rightfully expose this useful feature (in addition to using it themselves), allowing processes to do many thin
619.
▲
by
dzaima
3y ago
It's one-time for one project, but is a repeated hassle over multiple projects, and likely a different hassle at that.
620.
▲
by
dzaima
3y ago
Also, fwiw, re: your gather/scatter approach at https://news.ycombinator.com/item?id=38867074 : I believe you can't get away with just 16+16-bit per state transition case - you have to validate that the input is wh
621.
▲
by
dzaima
3y ago
Processing 32 inputs at 1-byte granularity means that you'll need to expand each of those 32 inputs across 5 registers, and means you lose the ability to trivially shift them along (would need 15 blends to align the 5 input bytes to 3
622.
▲
by
dzaima
3y ago
Not quite 32x as there's a 3-5 bytes of input per number, and a range of -999…999 for the output (and you'd generally want to load those consecutive bytes at the same time). 4x or 8x is certainly possible though; and you can even
623.
▲
by
dzaima
3y ago
The official 1BRC was Java-only, so no using any architecture-specific SIMD at all; the test system did have AVX2 though, and that's what most non-competing native solutions (including mine) targeted. Completely forgot about pmuludq, t
624.
▲
by
dzaima
3y ago
It can still be beneficial - yes you need to load the temperatures individually, but there's enough operations afterward to make it worth it.
625.
▲
by
dzaima
3y ago
It can, and various other 1BRC implementations have (though I doubt hotspot would manage to do it itself, never mind that most 1BRC submissions were run with Graal for the lower startup overhead). The 32×32→64-bit multiplication poses an is
626.
▲
by
dzaima
3y ago
Software implementations can and do differ (even dynamically) based on the hardware though - e.g. glibc's sin(x) function, what C code will end up using (if not other languages relying on the C stdlib), uses FMA instructions on my CPU,
627.
▲
by
dzaima
3y ago
Unfortunately, saying "contract is serious business" helps nobody. Much as it would be nice to not have to encounter any contracts (or even just not obscenely many) in the modern world, that is just largely not impossible, so peop
628.
▲
by
dzaima
3y ago
Unknown-bound loops are not vectorizable in general (at least not sanely; you'd need masked stores, aligned writes, and a bunch of handling for different cases of bound computation). I haven't seen many cases of missed hoisting (o
629.
▲
by
dzaima
3y ago
There are certainly a lot of things they may do suboptimally (in my experience: when there's register pressure; things that aren't nicely elementwise (bit arrays); preparation & tail handling can get pretty excessive; basicall
630.
▲
by
dzaima
3y ago
Canaries are a separate unrelated thing solving a different problem - buffer overruns, i.e. writing out-of-bounds. (canaries are a best-effort thing and don't guarantee catching all such problems, and they're also useless for safe
More ›