Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dzaima
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
121.
▲
by
dzaima
1y ago
Unfortunately, nice as it would be, your level of perfectionism is unfortunately not particularly common; indeed, it's possible to do things much more efficiently, but for most purposes "it works" is enough; and when it start
122.
▲
by
dzaima
1y ago
That'd easily result in accidental re-votes if a user watches the same video every couple months (and such re-watchers would likely be ones that.. like the video, thereby skewing data away from dislikes over time). Especially if the ex
123.
▲
by
dzaima
1y ago
That's assuming all of those are stored in packed formats, but even then it's not that low. I already mentioned that the user IDs are 36 base64 chars, or 27 bytes if you store them max-packed; YT video IDs are 11 base64 chars, so
124.
▲
by
dzaima
1y ago
Custom encodings, as was standard (or, well, mandatory) before Unicode (1991). Hell, Dyalog APL to this day supports its classic 1-byte-per-char encoding (not even ASCII-compatible! Nor EBCDIC!) in addition to Unicode. Looks like the APL ch
125.
▲
by
dzaima
1y ago
Also a user ID, which seems to be 36 base64 characters (can't have one user count for multiple votes). Round up to 500 raw bytes per row (perhaps including time/ip and other random garbage, plus indexes), 3x replication/redun
126.
▲
by
dzaima
1y ago
Video creators can freely delete comments, which makes relying on them for much sketchy.
127.
▲
by
dzaima
1y ago
I'd perhaps generalize that to "it's useful to have visual grouping correlate with semantic grouping"; applies to separating words with spaces, sentences with punctuation, paragraphs with newlines, lines of code, UIs, an
128.
▲
by
dzaima
1y ago
Unless the interpreter is capable of pattern-recognizing that whole pattern, that will be less efficient, e.g. having to work with 16-bit integers for x in the range 128..32767, whereas the direct version can construct the array directly (i
129.
▲
by
dzaima
1y ago
If the scalable VLEN is the same as the ALU width, which should generally be the target, small vectors would still perform optimally. Of course if you need less than a VLEN-sized vector you're wasting throughput, but that applies just
130.
▲
by
dzaima
1y ago
And even that only helps with the length problem, and doesn't help with doing new operations. For SIMD, baseline x86-64 (i.e. SSE + SSE2) didn't have dynamic shuffles & shifts & blend, float floor/ceil, integer conver
131.
▲
by
dzaima
1y ago
SSE3+ & AVX{,2,-512} & co improve on SSE in pretty much the same way that x86-64 improves on x86 - the old thing still works just fine, but the new one is wider, adds new (very useful!) instructions, doesn't copy over others, a
132.
▲
by
dzaima
1y ago
Same as with GC, neither need be a fixed choice; having a GC library/feature in Rust wouldn't mean that everything will be and must be GC'd; and it's still possible to add unleakable types were it desired: https:/&
133.
▲
by
dzaima
1y ago
dav1d is still in the "some very-important software" group; the vast vast majority of software doesn't and will not write everything in assembly. If you think RISC-V is gonna in any way change that, you're.. just trivial
134.
▲
by
dzaima
1y ago
While it is kinda unfortunate to have one unbalanced test suite as the major external progress indicator, there are.. like no other good options that don't involve someone manually going through like the top 1000 sites or something and
135.
▲
by
dzaima
1y ago
More specifically, basically the only absent 8-bit ops that have 32-bit equivalents in AVX2 are shifts and multiplies. Shifts are quite annoying (though, with a uniform shift they can be emulated on AVX-512 via GFNI abuse in 1 instr), multi
136.
▲
by
dzaima
1y ago
> Nowadays, programs requiring floating point hardware acceleration for reasonable performance use vector machine instructions. While some very-important software like video codecs, and various sporadic projects where some drive-by open-
137.
▲
by
dzaima
1y ago
Avoiding flags is indeed a decision backed by reason; but to do so, you don't necessarily need to have `beq a0, a1, label`, you can just do `xor t0, a0, a1; beqz t0, label`. Having full `beq` instead of just `beqz` is exactly as unnece
138.
▲
by
dzaima
1y ago
There's not much sign that RISC-V will be extremely-fusion-focused; indeed it'd be good for the base ISA, but Zba, Zbb, Zicond add a bunch of common patterns as distinct instructions, and things often fused on other architectures
139.
▲
by
dzaima
1y ago
gcc, via -m32, still defaults to no SSE, i.e. pre-1999, i.e. ≥26 years and counting for increasing default. clang, as far back as Compiler Explorer goes (i.e. clang 3.0.0, i.e. 2011), always assumes SSE for -m32; presumably because there&#x
140.
▲
by
dzaima
1y ago
"3R1W integer pipeline" is kinda ambiguous; I think it'd be extremely-stupid for any core to have all their ALUs be 3R. Much more sane is having ~half be such (if even that), and the rest at 2R. Or, better yet, have the 3R ex
141.
▲
by
dzaima
1y ago
Indeed most architectures error if the top bits are non-zero, but that's trivially worked around by just a manual `x & 0xffffffffffff` or `x << 16 >> 16` or similar, and software already utilizes that (and indeed must d
142.
▲
by
dzaima
1y ago
At least on Linux, you're guaranteed to get the top 16 bits free on at least x86[1] and ARM[2]. Maybe other OSes are less nice, but generally an OS doesn't really have a reason to force down the full 57-or-whatever-bit range befor
143.
▲
by
dzaima
1y ago
There is newer action on version tags: https://framagit.org/framasoft/framateam/mostlymatter/-/comm... (10.12 seeming to be the latest mattermost version, so fully up-to-date)
144.
▲
by
dzaima
1y ago
Besides making it much nicer for GC'd languages to target WASM, an important aspect is that it also allows cross-language GC. Whereas with a manual GC, if you had a JS object holding a reference to an object on your custom heap, and yo
145.
▲
by
dzaima
1y ago
This is an interactive accompaniment to a video that contains more information: https://www.youtube.com/watch?v=YGLNyHd2w10 (previously discussed a bit at https://news.ycombinator.com/item?id=45002866 )
146.
▲
by
dzaima
1y ago
The decompressed output needn't be in-memory (or even on-disk; it could be directly streamed to analysis) all at the same time, at which point resource limits aren't a problem at all. And I believe --long already is a "grater
147.
▲
by
dzaima
1y ago
With just a single file you can trivially use it such that everything is inlined (if it's of the sort that static-s all functions, at least), even across multiple files using it, without needing the full compile-time-destruction of LTO
148.
▲
by
dzaima
1y ago
Another bad choice (perhaps more accurately called a bug, but they chose to not do anything about it): vmv1.r & co (aka whole-vector-register move instructions) depend on valid vtype being set, despite not using any part of it (outside
149.
▲
by
dzaima
1y ago
Oh, true. Even further down low-level/frequently-unused details though; and RISC-V does without it (/ flags in general) roughly fine.
150.
▲
by
dzaima
1y ago
You could pretty easily have an integer representation using [-127; 128]; 128 being 0x80 of course (all other values being the same as in two's complement). Still would hold that -n == 1 + ~n, zero is all-zeroes, and the property that
More ›