Sign in

Per Vognsen

@pervognsen.mastodon.social.ap.brid.gy
15 followers 0 following 374 posts

I like programming and understanding how stuff works. My background is in systems programming and game development. 🌉 bridged from ⁂ mastodon.social/@pervognsen, follow @ap.brid.gy to interact

PostsRepliesMedia
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 10/10/2026
If you updated Firefox and wondered what the hell happened to the UI like I did, open about:config and set browser.nova.enabled = false.
001
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 09/10/2026
Here's a random trick that can come in handy. For reference-counted copy-on-write tree nodes, you can get away with an unusually small number of refcount bits. When the refcount for a particular node is capped, you just make a copy.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 08/10/2026
We are so back.
In-game screenshot of F14 in hangar bay of aircraft carrier, from the newly released Ace Combat 8: Wings of Theve.
010
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 07/10/2026
Any time I see this kind of thing, it makes me want to do a wait-free helping scheme. With tile-based rendering it should be pretty easy since redundant writes to the framebuffer of the same final output is idempotent.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 05/10/2026
I like fork-join parallelism as a model but I've never seen a case where you don't end up with significant thread under-utilization for a cyclic/frame-oriented workload like a game if that's all you do. Probably the easiest fix without moving to an unstructured task graph is (1) fill holes […]
mastodon.social
Original post on mastodon.social
100
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 04/10/2026
At first I thought I was misinterpreting a measurement, but I just did a targeted experiment and indeed you can sustain 32 B/cycle loads from L3 from up to 4 of the 8 Zen 5 cores before it starts to drop off to 22 B/cycle for 8 cores. Considering that Zen 4 had an L1-to-core throughput limit of […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 04/10/2026
I haven't updated Tracy in forever. I just pulled and rebuilt and this greets me when I open the visualizer.
Pop-up: Tracy Profiler is a complex tool with many features. It can be difficult to discover all of them on your own.

The Achievements system will guide you through the main features and teach you how to use them in an easy-to-handle manner. You can use this system as a tutorial how to use Tracy Profiler.

Would you like to enable achievements? Yes/No
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 03/10/2026
RE: mastodon.gamedev.place/@rygorous/11… Fabian info-dump, based on his experience (or so I believe, he doesn't say so explicitly) implementing this in the Larrabee software renderer/graphics driver.
mastodon.gamedev.place
001
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 03/10/2026
Random trick: if you allocate different types (of a set of contextually possible variant types) in appropriately aligned parts of the virtual address space, a type-tagged pointer can be be dereferenced directly as if it were an untagged pointer. And with this scheme you can also replace […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 01/10/2026
Trying to kill the myth of immediate-mode UI being power inefficient.
Debug stats overlay from WIP immediate-mode UI.
001
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 01/10/2026
I wonder if anyone else is seeing the same of crazy impacts of store-forwarding stalls I've been mentioning. It's part of my standard performance analysis harness how and I just had a case where shrinking a struct from 128 bytes to 124 bytes introduced a store-forwarding stall that caused a 17% […]
mastodon.social
Original post on mastodon.social
010
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 01/10/2026
When I occasionally revisit the old volumes of TAOCP, I'm always struck by how useless I find the flowchart diagrams whereas it seems like they're expected by Knuth and his contemporaries to be the most intuitive of the three ways he present algorithms. Anyway, I was reminded of this because […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 01/10/2026
There's arguably two good ways of doing scrollbars if you have a bidirectional layout model: either reserve the scrollbar gutter whether or not the scrollbar is visible, or overlay the scrollbar onto the content. If you let the scrollbar takes up space in the layout depending on whether it's […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 27/09/2026
Question for PL theorists: under what circumstances do you consider a separate declarative and algorithmic type system (with a provable relationship) important? My sense is that it's a worthwhile endeavor when the declarative system has non-trivial non-determinism you're trying to resolve.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 27/09/2026
I saw this in a ripgrep's issue thread that turned out to be a kernel bug. "I think it's worth contemplating why the kernel works at all." github.com/torvalds/linux/commit/47…
github.com
mm: fix incorrect flush address in direct page table reclaim · torvalds/linux@478a1c3
When zap_pte_range reclaims a page table, it does: pte_free_tlb(tlb, pmd_pgtable(pmdval), addr); and this is unconditionally wrong: if this code executes, addr *always* points one past the en...
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 27/09/2026
Super heavy rain right now, the kind where the sky just opens up, after a week of almost constant rain. Decided to walk around the property and inspect the drainage situation and it mostly seems to be holding up. Most of the property is covered by some kind of roofing and it forces you to figure […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 23/09/2026
I saw a clip last week from the new Nathan Fielder film on Elizabeth Holmes and everything about it gave mockumentary with a Holmes impersonator. But I just watched the trailer and learn that it's actually real?!? www.youtube.com/watch?v=GGJSRFWALTI […]
mastodon.social
Original post on mastodon.social
100
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 22/09/2026
I was stress testing some concurrent code for tail latency so I now have a file called lock_hog.rs, which reminded me of one of the temp testers Oculus had leading up to Rift launch who sent me a screenshot of Windows Task Manager with memory usage circled in red. And the file was title […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 22/09/2026
Assertions: A Personal Perspective, Tony Hoare's 2000 Kyoto Prize Lecture: ora.ox.ac.uk/objects/uuid:2a863153-…
000
Reposted by Per Vognsen
✧✦Catherine✦✧ @whitequark.treehouse.systems.ap.brid.gy · 21/09/2026
do I know any electronical engineers who would be willing to review Glasgow revD1 schematic/layout before we send it to the fab tomorrow evening? it's in KiCAD and available on github.com/tachiniererin/glasgow/tr… if you have the time and inclination
github.com
GitHub - tachiniererin/glasgow at hw-revD1
Scots Army Knife for electronics. Contribute to tachiniererin/glasgow development by creating an account on GitHub.
2020
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 21/09/2026
I thought I was being clever by using system packages built for znver4 so they could benefit from AVX-512, but valgrind doesn't work and now I'm regretting my choices.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 20/09/2026
Knuth, The Genesis of Attribute Grammars: www.cs.miami.edu/home/odelia/teachi…
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 19/09/2026
An article on TSO emulation by the FEX devs. The scourge of x86 emulation: fex-emu.com/Scourge-of-emulation
fex-emu.com
The scourge of x86 emulation
Comments
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 19/09/2026
Name something more iconic than the TP7-era color scheme of Turbo Vision: free.oberon.org/docs/en/Strings.html
free.oberon.org
Strings Module Reference
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 18/09/2026
What is going on in C++ land... "When possible, avoid the u8 prefix. It has significantly different semantics starting in C++20 than in C++17, producing arrays of char8_t rather than char, and will change again in C++23."
100
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 18/09/2026
What is going on in C++ land... "When possible, avoid the u8 prefix. It has significantly different semantics starting in C++20 than in C++17, producing arrays of char8_t rather than char, and will change again in C++23."
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 18/09/2026
Almost every time I see saturating add/multiply used to avoid overflows, it's silently wrong or if it's only accidentally right (just because a big wrong number from saturation is a safer bound than a small wrong number from wrapping).
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 18/09/2026
BTW, since Oberon-0 is such a small language, it was really easy to whip up an alternative Lisp-like syntax. I was mostly just curious how it would look and how it would affect frontend performance (since lexer/parser is the majority of the compiler's running time) for the same programs. Anyway […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 18/09/2026
This is really cool: iev.ee/blog/categorize-everything-a….
iev.ee
Labeled matches: why is this not in every regex engine?
Comments
003
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 18/09/2026
"It's about time Jeffrey "Pulse" Lim (of Impulse Tracker fame) took his rightful place as the GOAT of regex engines." via github.com/BurntSushi/rebar/pull/34. Holy crap, some numbers, and also a blast from the past with the Impulse Tracker connection.
github.com
Add Jeffrey Lim's JavelinPattern engine by 9cel · Pull Request #34 · BurntSushi/rebar
It's about time Jeffrey "Pulse" Lim (of Impulse Tracker fame) took his rightful place as the GOAT of regex engines. Engine Version Geometric mean of speed ratios Be...
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 17/09/2026
It's that time when a new Fire Emblem comes out, probably the only Nintendo-only series I have any interest in, and I sigh wishing I had a Switch 2 before remembering that it would just collect dusk.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 17/09/2026
If anyone is curious, here's a tape dump of my compiler's IR for the WriteNum procedure. Because the compiler is single pass, the backend API is basically a streaming DSL interpreter in the finally-tagless style, so it doesn't have to materialize any IR to do its job. This dump is just what you […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 17/09/2026
I don't have the numbers anymore, but last week when I was first doing a perf pass on the compiler I was pretty shocked by how much time was to STLF stalls because of caller/callee load/store granularity mismatches, and X86AvoidStoreForwardingBlocks only works within a function.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 16/09/2026
OK, this is the absolute last nerd-polishing I'm doing on this visualization, unless I find outright bugs. But I think it's pretty sweet now: gist.github.com/pervognsen/5eb0fdcf…
gist.github.com
WriteNum.dense.dis
GitHub Gist: instantly share code, notes, and snippets.
100
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 16/09/2026
Here's an annotated listing which is more or less the Oberon code for MulOp from Wirth's book. The generated code is using the WIP greedy register allocator, which still isn't enabled by default. gist.github.com/pervognsen/8739810d…
gist.github.com
greedy-regalloc.asm
GitHub Gist: instantly share code, notes, and snippets.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 16/09/2026
@jdryg BTW, if you have time I'd love to see what your C compiler does for c.godbolt.org/z/oKhbj5x8z
c.godbolt.org
Compiler Explorer - C
// PROCEDURE WriteNum(n, width: INTEGER); // VAR d, t: INTEGER; // BEGIN REG n, width, d, t; d := 1; t := n; // IF t < 0 THEN d := 2; t := -t END; // WHILE t >= 10 DO t := t DIV 10; d += 1 END; // WHILE d < width DO WriteChar(32); d += 1 END; // WriteInt(n) // END WriteNum; // // : // sub rsp,24 // cmp rsp,QWORD PTR // jb // mov r15d,ecx // mov r14d,esi // mov r12d,1 // mov ebp,r15d // test ebp,ebp // ,-- jge // | mov r12d,2to // | neg ebp // >-> cmp ebp,10 // ,--|-- jl // | | mov edx,ebp // | | sar edx,31 // | | xor ebp,edx // | | imul rbp,rbp,1717986919 // | | shr rbp,34 // | | xor ebp,edx // | | inc r12d // | '-- jmp // >----> cmp r12d,r14d // | ,-- jge // | | mov esi,32 // | | mov rdi,QWORD PTR // | | call QWORD PTR // | | inc r12d // '--|-- jmp // '-> mov esi,r15d // mov rdi,QWORD PTR // call QWORD PTR // add rsp,24 // ret extern void *io; extern void WriteChar(void *io, int c); extern void WriteInt(void *io, int i); // If you don't know, 'register' actually has an effect on gcc -O0. void WriteNum(register int n, register int width) { register int d, t; d = 1; t = n; if (t < 0) { d = 2; t = -t; } // Oberon has Euclidean division, so t / 10 is not exactly the same. while (t >= 10) { t = t / 10; d += 1; } while (d < width) { WriteChar(io, 32); d += 1; } WriteInt(io, n); } #ifdef __TINYC__ void *io; void WriteChar(void *io, int c) {} void WriteInt(void *io, int i) {} void main() {} #endif
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 16/09/2026
Got column-precision debuginfo emission working but I spent more time just figuring out a reasonable way to visualize it in disassembly dumps. I originally didn't want to reprint every source line for column changes but now that I see it working as I had intended it, it looks a bit too sparse to […]
mastodon.social
Original post on mastodon.social
200
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 14/09/2026
The ECMA Script standard uses a simple parameterized notation that is formally macro-expandable to a plain context-free grammar. It basically formalizes the usual trick of passing down flags in your recursive-descent parser that selectively enable/disable specific alternatives, in order to avoid […]
mastodon.social
Original post on mastodon.social
100
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 14/09/2026
When you don't have the time to get the details right for fast constant divisions in your compiler and just hard code the magic constants for the small divisors that tend to occur in practice.
100
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 14/09/2026
Also, Oberon-0 is so wonderfully minimalistic even by the standards of the full Oberon Report. Who needs functions when you have procedures with VAR parameters.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 14/09/2026
I wanted to write something up to get this side project done and out of my system and get on to other things. Anyway, as part of that I was preparing a disassembly for my Oberon-0 to x86-64 compiler when fed Compiler.mod, which is the self-hosting RISC-0-only version. And because my write-up […]
mastodon.social
Original post on mastodon.social
100
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 14/09/2026
I really wish Owlcat would stop using JSON for their save game format. I literally have GBs of save games on Steam Cloud just from Pathfinder: Wrath of the Righteous. And they grow massively as you progress through the game due to the accumulating persistent world state you'd expect in an RPG […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 14/09/2026
I kind of wish LLVM had a global temperature parameter you could use to add appropriately-scaled noise whenever there's a threshold-based decision of some sort.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 14/09/2026
I added same-core SMT speed-up as a primary metric to my evaluations and then went back and re-evaluated some previously rejected optimization ideas. Still not totally done but after re-applying the ones that hold up, the same-core SMT speed-up on my benchmarks went from 50% to 60%.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 14/09/2026
I was already controlling for performance anomalies related to layout within the executable. But I have a repro where making a byte-exact copy of an executable occasionally (about 10%) of the time will create a program that runs significantly slower (5-10%) than the original because of where it […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 12/09/2026
As a palette cleanser, I decided to port Wirth's Oberon-0 compiler to C verbatim and also do my own parallel reimplementation of Oberon-0 as a side-by-side comparison, mostly focused on optimizing his frontend, and adding an x86-64 backend while also improving codegen quality but staying with […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 12/09/2026
I've been known to use throughput/core as a performance metric but I'm measuring some of my compiler code that gets a really good benchmark with 2-way SMT and I realize that metric is kind of misleading if you don't know whether it means physical or logical core/hardware thread.
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 12/09/2026
I really enjoy Firefox's split tab feature but I wish I could use a modifier key when left clicking links similar to ctrl-click for open in new tab and shift-click for open in new window. Is there some magic I'm missing?
001
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 10/09/2026
Looks like the long-rumored MSVC backend for rustc is finally out. They don't really mention it except in passing but I heard one of the major motivations is that they wanted parity with MSVC when it comes to the correctness/accuracy of debug info (versus the disaster that is LLVM), so I'm […]
mastodon.social
Original post on mastodon.social
000
Per Vognsen @pervognsen.mastodon.social.ap.brid.gy · 09/09/2026
I enjoy reading books on my Kindle Paperwhite but one part that has regressed compared to first generation Kindles is the gesture-based touchscreen interface. Although when I was flying home a few weeks ago, the in-air entertainment system also used gesture-based touchscreens and had even higher […]
mastodon.social
Original post on mastodon.social
000