Recent submissions

Comment · 2 years ago
Thanks!
Comment · 2 years ago
Clang recently got a new calling convention that makes these tail calls much cheaper (avoids the need for the caller to preserve some registers). I can never remember the name - it’s either preserve_all or preserve_none (whose perspective is the preservation from?).
Comment · 3 years ago
Comment · 3 years ago
On 1: this small amount of overhead matters because the amount of work you do on each opcode can be tiny. The extra jump could be 20% of your runtime! On 2: yes, this helps the indirect branch target predictor. In a real program you’ll often get repeated sequences of opcodes (increment, then compare) that can be predicted. These branch predictors can be pattern based.
Comment · 3 years ago
Try dear-imgui + implot. There are Python bindings
Comment · 4 years ago
There’s a Hello World on the page
Comment · 4 years ago
30 years?
Comment · 4 years ago
Agreed, autovec is in my experience where clang really shines.
Comment · 4 years ago
Disappointed this wasn't an article about bath houses
Comment · 4 years ago
One nice property is their stable addressing. A linked list element won't move once allocated.
Comment · 4 years ago
Amsterdam is good for options market making, most of the techniques in this book come up a lot in trading
Comment · 4 years ago
reinterpret_cast comes up a lot when handling binary protocols - e.g. reading a message struct off a buffer / packet. How would this be handled in Rust or otherwise without copying the data?
Comment · 5 years ago
You can just define a generic fallback method like `eff(p, d1, d2) = eff(p, d2, d1)`
Comment · 5 years ago
Could a difference in alignment of the hot loop also have an effect here?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton