Hacker News
Show HN: Godbolt-in-a-floating-window for Neovim (C, C++, Rust)
bajard
|next
[-]
This should be mandatory for any programming environment, along with a CPU emulator showing how data moves through the ALU, and all the ports, to which registers it goes to, and how everything works clock by clock.
I hope AI makes this possible, at least for VS Code and C++.
ceryle
|root
|parent
|next
[-]
rpqt
|root
|parent
|next
|previous
[-]
bee_rider
|root
|parent
|previous
[-]
bajard
|root
|parent
[-]
The parts not involved could be drawn in miniature, like the AVX2 hardware. More detail could be shown if the user clicks.
It probably isn't as complex to draw.
bee_rider
|root
|parent
[-]
I try to push the computations involve in the critical path up as high as possible, and then just hope that between the compiler and hardware somebody’ll take advantage of that.
I haven’t tuned a ton of kernels though, I mostly do linear algebra stuff and good BLAS implementations do better than I could hope to.
bajard
|root
|parent
[-]
Modern x86 CPUs have multiple execution ports, with duplicated hardware for the same operations, and the exact same operation can be performed in different ways.
As a toy example, multiplying a number by 2 can be done using multiplication, a bit shift, addition (adding the value to itself), or the pointer calculator. On x86 CPUs, these instructions can execute simultaneously on different ports, allowing you to perform six or more operations in parallel. This means you can achieve higher throughput by using different implementations of the same operation instead of relying on a single instruction.
You can't leave this to the compiler. It chooses only one implementation, leaving other execution ports unused.
evmar
|next
|previous
[-]
waschl
|next
|previous
[-]
shmerl
|next
|previous
[-]
RahulMishra315
|next
|previous
[-]
ivanjermakov
|next
|previous
[-]
FirstClassTree
|previous
[-]
0xdeadf1sh
|root
|parent
|next
[-]
FirstClassTree
|root
|parent
|next
|previous
[-]
swatcoder
|root
|parent
|next
|previous
[-]
Yet far from all of the code, all of the time, for all of the people.
People just like to talk it up, especially if they've been able to let it take over they're own coding. And some people work and chat in bubbles where they only know people working similarly to themselves.