Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cmovq
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
31.
▲
by
cmovq
7mo ago
Compilers cannot do this optimization for floating point [1] unless you're compiling with -ffast-math. In general, don't rely on compilers to optimize floating point sub-expressions. [1]: https://godbolt.org/z/
32.
▲
by
cmovq
7mo ago
> After all of the above work and that talk in mind, I decided to ask an LLM. Impressive that an LLM managed to produce the answer from a 7 year old stack overflow answer all on its own! [1] This would have been the first search result f
33.
▲
by
cmovq
7mo ago
But RISC-V is a _new_ ISA. Why did we start out with the wrong design that now needs a bunch of extensions? RISC-V should have taken the learnings from x86 and ARM but instead they seem to be committing the same mistakes.
34.
▲
by
cmovq
7mo ago
Just turn on a light?
35.
▲
by
cmovq
7mo ago
> Rust programmers can take advantage of the srgb crate I don’t like the NPMification of Cargo. Do you really need to pull in a dependency for something like this?
36.
▲
by
cmovq
7mo ago
> it uses 150% scaling (as opposed to the ideal 200%) which means you have subtle display artifacts 200% is ideal but scaling on Windows has gotten really good. I use 150% on a 4K monitor and it works well.
37.
▲
by
cmovq
8mo ago
Dividing a float by zero is usually perfectly valid. It has predictable outputs, and for some algorithms like collision detection this property is used to remove branches.
38.
▲
by
cmovq
8mo ago
Would defer be considered hidden control flow? I guess it’s not so hidden since it’s within the same function unlike destructors, exceptions, longjmp.
39.
▲
by
cmovq
8mo ago
>> Microsoft are free to change the Native API at will, and you will be left holding both pieces when things break. > [...] the worst case scenario is really mild: A new version of windows comes out, breaking ntdll compatibility. Z
40.
▲
by
cmovq
8mo ago
Interesting, some functions explicitly mention: > [NtQuerySystemTime may be altered or unavailable in future versions of Windows. Applications should use the GetSystemTimeAsFileTime function.] [0] So it does seem like a bad idea for a st
41.
▲
by
cmovq
8mo ago
Is there an official stance on whether ntdll is stable? Obviously they're not going to change things arbitrarily since applications depend on it, but I'm wondering if there is a guarantee like the linux syscall interface or how yo
42.
▲
by
cmovq
8mo ago
I never understood this sentence structure, it adds zero information, it always goes like: “This isn’t just [what the thing literally is]; it’s [hyperbole on what the thing isn’t].”
43.
▲
by
cmovq
8mo ago
If you’re asking about the register file, it’s around a couple hundred registers varying by architecture. You’d need several usages of the ISA register without dependencies to run out of physical registers. You’re more likely to be bottlene
44.
▲
by
cmovq
8mo ago
Vim (kind of) has it though it doesn’t render the cursors: Ctrl-V, then move down the lines you want to edit, Shift-I to insert text on multiple lines at once.
45.
▲
by
cmovq
8mo ago
Right, it has much worse throughput: Memory: https://uica.uops.info/tmp/f022a3c0a70e4ae5ab3588ebe65fd2a5_... Register: https://uica.uops.info/tmp/e80e60e0c4914955b11dc6590711c1b8_...
46.
▲
by
cmovq
8mo ago
This is true, but what the parent comment is getting at is we really just want to be able to address graphics memory the same way it's exposed in CUDA for example. Where you can just have pointers to GPU memory in structures visible to
47.
▲
by
cmovq
8mo ago
There should be a better abstraction to solve the GL state leakage problem than PSOs. We end up with a combinatory explosion of PSOs when some states they abstract are essentially toggling some bits in a GPU register in no way coupled with
48.
▲
by
cmovq
8mo ago
That makes sense. LLVM could probably do better here by using the memory operand version: https://godbolt.org/z/jeqbaPsMz
49.
▲
by
cmovq
8mo ago
> For memory operands, there's an additional twist: the bit index is a signed offset that can address bits outside the nominal operand. A bit index of 35 on a dword accesses bit 3 of the next dword in memory. I wonder what is the us
50.
▲
by
cmovq
8mo ago
The mistake was using the "Kibi" prefix. "Kibibyte" just sounds a bit silly when said out loud.
51.
▲
by
cmovq
8mo ago
Last time I checked LLVM had surprisingly bad codegen for this using int128. On x86 you only need two instructions: __asm ( "mulq %[multiplier]\n" "divq %[divisor]\n" : "=a"(result
52.
▲
by
cmovq
8mo ago
The scripting language looks like it would be more cumbersome to use than C.
53.
▲
by
cmovq
9mo ago
Can someone using modules chime in on whether they’ve seen build times improve?
54.
▲
by
cmovq
9mo ago
Interestingly the original Pi had the same amount of memory as the PS3 which was available at the time of the Pi release. Still amazes me how much we did with only 512MB.
55.
▲
by
cmovq
9mo ago
This is true, but if you run out of the 32 register names you’ll still need to spill to memory. The large register file is to allow for multiple instructions to execute in parallel among other things.
56.
▲
by
cmovq
10mo ago
https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-...
57.
▲
by
cmovq
10mo ago
> A miscompile of an AI program can cause bad medical advice I think the AI program is plenty capable of causing bad medical advice on its own without being miscompiled.
58.
▲
by
cmovq
11mo ago
On data center as well. I think AMD rightly decided to focus on larger chips for data center instead of consumer laptops where margins are tiny in comparison and growth has been slow for a few years.
59.
▲
by
cmovq
11mo ago
Dithering is still very common in rendering pipelines. 8 bits per channel is not enough to capture subtle gradients, and you’ll get tons of banding. Particularly in mostly monochrome gradients produced by light sources. So you render everyt
60.
▲
by
cmovq
1y ago
Yeah it’s nice even just to avoid having to set up a vertex buffer: ivec2 vert = ivec2(gl_VertexID & 1, gl_VertexID >> 1); out_uv = 2.0 * vec2(vert); gl_Position = vec4(out_uv * 2.0 - 1.0, 0.0, 1.0);
More ›