Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dzaima
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
301.
▲
by
dzaima
2y ago
So the 1024-bit number is the number of vector output bits per cycle, i.e. 2×FMA+2×FADD = (2+2)×256-bit? Is the term "datapath width" used for that anywhere else? (I guess you've prefixed that with "total " in some
302.
▲
by
dzaima
2y ago
Zen 5 still clocks way higher than GPUs even with the penalties. Additionally, CPUs typically target much lower latency for operations even per-clock, which adds a ton of silicon cost for the same throughput, and especially so at high clock
303.
▲
by
dzaima
2y ago
Wouldn't it be 1536-bit for 2 256-bit FMA/cycle, with FMA taking 3 inputs? (applies equally to both so doesn't change anything materially; And even goes back to Haswell, which too is capable of 2 256-bit FMA/cycle)
304.
▲
by
dzaima
2y ago
Basically noone other than browser vendors will look at the spec anyway. The reality is effectively descriptive, not prescriptive. Sure, without having a majority marketshare a browser can't by itself push for their new features to be
305.
▲
by
dzaima
2y ago
I read that as saying that binary search isn't among those "nontrivial problem" s, along with most other things with known exact deterministic sublinear time algorithms. And your first quote is followed by "However, fo
306.
▲
by
dzaima
2y ago
I don't imagine using them much either even if they were feasible to use (I have the extra trouble of being primarily in a community that's bridged to discord, but the bridge doesn't bridge threads), but I've seen them u
307.
▲
by
dzaima
2y ago
Browser sandbox escape to userspace exploits are still much harder to make though, compared to... uh.. a userspace to userspace exploit, given that the latter takes literally (actually literally) zero effort, and as such you don't have
308.
▲
by
dzaima
2y ago
Matrix isn't particularly better though; its main spec does "have" a bunch of things, sure, but they're still very bodged together (threads are replies but with a tag of "no, this is actually a thread"; and for
309.
▲
by
dzaima
2y ago
Some more experimentation later, it seems to be more like just counting PROT_WRITE+MAP_PRIVATE mappings or so; i.e. mprotect(PROT_NONE)ing (or even just PROT_READ) a writable region results in it not being counted, even if the region was mo
310.
▲
by
dzaima
2y ago
Interesting! Some searching later, looks like htop's DATA/M_DRS counter (i.e. second-to-last number in /proc/<PID>/statm) appears to count something related-ish; i.e. doesn't count a PROT_NONE mmap, but d
311.
▲
by
dzaima
2y ago
Yeah, a gigabyte is most likely extremely overkill indeed, a megabyte or so would be plenty; though the goal would be to get threadlocals to be able to be as arbitrarily large as non-initial-exec threadlocals so it wouldn't break anyth
312.
▲
by
dzaima
2y ago
But with virtual memory it wouldn't be much of a cost at all (..on 64-bit systems, that is; things are more sad on 32-bit if one cares about those). Just some kernel-internal data structure configuration to ensure that future memory pa
313.
▲
by
dzaima
2y ago
> Using too much initial-exec TLS (potential across multiple shared objects) eventually causes dlopen to fail because the TCB cannot be resized. This feels like the perfect situation to preallocate a gigabyte or something of virtual memo
314.
▲
by
dzaima
2y ago
In a simple benchmark, creating a thread & waiting on it in a loop (pthread_create+pthread_join) takes 0.03ms = 30000ns, so running a bunch of constructors of a bunch of libraries could actually be a non-insignificant amount of time. Do
315.
▲
by
dzaima
2y ago
rbp/r13 are there because the funky way x86 encodes ModR/M means that they get a "+ 0" forced onto them, i.e. [rbp + rax*8] actually must be [rbp + rax*8 + 0] and as such behaves like a 3-operand lea. (same for [rbp] → [
316.
▲
by
dzaima
2y ago
e.g. this is the guarantee in RISC-V: https://github.com/riscv/riscv-isa-manual/blob/70040578316b9...
317.
▲
by
dzaima
2y ago
And the JITting in closures amounts to a total of three instructions; certainly not for speed, rather just as the bare minimum to generate distinct function pointers at runtime.
318.
▲
by
dzaima
2y ago
It certainly uses native machine code, but I don't think it generates any at runtime outside of the reverse-FFI closures (at least on linux)? PROT_EXEC at least isn't used outside of them, which'd be a minimum requirement for
319.
▲
by
dzaima
2y ago
> there's an open bug ticket noting that it doesn't protect against contraction ( https://github.com/llvm/llvm-project/issues/91674 ). Huh. ¯\_(ツ)_/¯ I didn't really mean the loop thing a
320.
▲
by
dzaima
2y ago
libffi doesn't JIT for FFI calls; and it still requires you to lay out argument values yourself, i.e. for a string argument you'd still need to write code that converts a Ruby string object to a C string pointer. And libffi is rat
321.
▲
by
dzaima
2y ago
> but only sequences of inlined sqrt calls within an unrolled loop Somewhat-relatedly, that's also a problem with vectorized math libraries, affecting both gcc and clang, where the vectorized function has a different result to the s
322.
▲
by
dzaima
2y ago
On the ppc64 thing, some ways to avoid it: https://godbolt.org/z/fx88rYz5v
323.
▲
by
dzaima
2y ago
"doesn't affect other things" is in no way ever whatsoever a reason to do anything in any way related to thinking, believing, or hoping that it might, would, or should affect nothing, especially around compiler optimizations
324.
▲
by
dzaima
2y ago
...on -ffast-math. Of course you'll have arbitrary behavior of (at least) a couple ULPs on -ffast-math, but it'll be faster (hopefully)! That's, like, the flag's whole idea.
325.
▲
by
dzaima
2y ago
Oh, another interesting thing is http://beyondloom.com/tools/specialk.html - a simple k DSL for shaders. Though it still follows the shader language paradigm of running the function for each pixel separately, rather th
326.
▲
by
dzaima
2y ago
err, on the Android termux thing - building CBQN is annoyingly slightly non-trivial - have to `pkg install libandroid-spawn`, and then `make for-build lf=-landroid-spawn; make lf=-landroid-spawn`, because android doesn't come with posi
327.
▲
by
dzaima
2y ago
For 32-bit float single-operand ops it's simple enough to rely on a brute-force check. For 64-bit floats, though, while the goal of "sin(x) in library A really should match sin(x) in library B" is nice, it essentially ends up
328.
▲
by
dzaima
2y ago
There might also be the option of just optimistically assuming that, for points in a file with a sequence of like >4K bytes of proper newlines with proper comma counts in each, that here probably isn't in the middle of a multiline
329.
▲
by
dzaima
2y ago
> It's quite trivial if the language exposes an interface for iterating both clusters and points, and without such an interface the problem is much harder to notice I assure you, 99% of people won't handle this correctly even i
330.
▲
by
dzaima
2y ago
I meant the combining mark point as a thing you would want to cut off; a 50-char chopped-off "summary" of a thing should not include a character with ten thousand combining marks ever. Of course it'd be preferred to cut t
More ›