Welcome to SwedenCpp
Latest blogs, videos, podcasts and releases in one stream
Monday, November 23, 2026
InsideC++26481, Always Enforce 26🎥SwedenCpp
C++ Weekly - Ep 560 - Implicit vs Explicit Lambda Captures... Performance Difference?🎥Jason Turner
Qt Creator 21 releasedWe are happy to announce the release of Qt Creator 21! Release 21 of the Qt Creator IDE lets AI agents automate more of your editing, building, running, and debugging, while you control more of what they can do and see what they cost. A new Profile mode tells you not only where your application slows down, but what to do about it.📝Qt Blog
C++ Trends: C++ standard usage since 2020🎥MeetingCpp
Familiar C++ Patterns That Fail at Scale and the Design Shifts That Prevent Them - CppCon 2026🎥CppCon
Let's Make a Programming Language Course Teaser🎥PVS-Studio
Seeing the machine code of your Java program, with a few lines of JavaWhen I want to know why some Java code is slow, I usually reach for JMH. JMH is great to time a function. But a timing tells you how slow the code is, not why. For that, you need to see the machine code that the JIT compiler produced, and where the processor spends its … Continue reading Seeing the machine code of your Java program, with a few lines of Java📝Daniel Lemire's blog
Code Reviews - Building Better Code and Stronger Teams - Sandor DARGO - ACCU 2026🎥ACCUConf
Creating Intuitive Interactive Music Systems Across Media - Amirreza Amouie (amu) - ADC Japan 2026🎥audiodevcon
Ye olde software shoppeI find myself a bit of an outlier at the moment. I’m not rushing headlong into AI coding as I currently have no requirement to do so… That probably sounds strange, but nobody is currently paying me to use AI coding tools and I have deadlines to meet and plenty of things to do. I’ve personally never found the coding part of the job to be the bottleneck. Design, testing and continuous improvement of a stable codebase has, generally, been more of my focus.📝Rambling Comments - Len Holgate's blog
The problems of compile-time, preprocessor managed, conditional code in C++When I talk about conditional code here I’m talking about the kind of conditional code that uses the C or C++ compiler’s preprocessor. This is used to insert or remove blocks of code at compile time based on preprocessor defines. These #defines may or may not be set at the point at which you build a version of the software. There are, I think, two ways to use the preprocessor like this.📝Rambling Comments - Len Holgate's blog
Dying, Egypt, dyingThe biographer of [William Haines Lytle](https://en.wikipedia.org/wiki/William_Haines_Lytle) writes, of his poem ["Antony and Cleopatra"](https://archive.org/details/poemsofwilliamha00lytl/page/60/mode/2up): > Bryant's "Library of Poetry and Song" is held responsible for > having first put into circulation the absurd fiction that Lytle's > famous poem was written while the author lay mortally wounded > after the battle of Chickamauga.📝Arthur O’Dwyer
GSoC 2026: llvm-advisor - Optimization Remarks & VisualizationsThis summer I worked on llvm-advisor , LLVM’s web-based compiler advisor, aspart of Google Summer of Code 2026. llvm-advisor was started during last year’sGSoC by Miguel Cárdenas ,and this year I extended it with optimization-remarks storage, search, heatmap,Code Explorer, PGO hotness, and snapshot diff. The goal was to make optimizationremarks (the diagnostics emitted by clang -fsave-optimization-record )searchable, comparable, and visual. Optimization remarks are the compiler’s way of explaining its decisions back toyou. Every time Clang decides to vectorize a loop, inline a call, or give up onan optimization, it can emit a structured diagnostic tied to a source location.Without these remarks, the only way to reconstruct what happened is to readassembly or rely on intuition. With remarks however, you can ask targeted questions: “Why wasn’t this loop vectorized?”, “Did my change help?”, “Which missed remark isactually worth fixing?” Real projects can produce millions of these remarks, soyou need a tool that can filter, aggregate, and visualize them. That’s whatllvm-advisor does. This matters whether you’re a compiler developer tuning inlining or vectorization heuristics, a user upgrading your toolchain and watching for regressions, or someone making performance-critical source changes. The example here is small for a walkthrough, but the workflow remains the same and similar bottlenecks show up in production code, and a large build can easily emit more remarks than a person can go through by hand. This is where the viewer helps: instead of drowning in raw remark data, you can narrow things down to the handful of diagnostics that actually point at a problem. Let’s walk through an example to see how it works. I took a small C programthat was missing a vectorization opportunity, used llvm-advisor to find the exactremark, changed one function from noinline to static inline , and measuredthe result. The workflow: turning a missed vectorization into a faster loop The baseline code Here is baseline.c . The helper work is marked __attribute__((noinline)) ,so the loop in process has to call it on every iteration. #include __attribute__ ((noinline)) int work ( int x) { return x * 3 + (x >> 2 ); } void process ( int * a, int n) { for ( int i = 0 ; i n; ++ i) a[i] = work (a[i]); } int main ( int argc, char ** argv) { int n = argc > 1 ? atoi (argv[ 1 ]) : 10000000 ; int * a = ( int * ) malloc (n * sizeof ( int )); for ( int i = 0 ; i n; ++ i) a[i] = i & 0xff ; for ( int run = 0 ; run 10 ; ++ run) process (a, n); int sum = 0 ; for ( int i = 0 ; i n; ++ i) sum += a[i]; free (a); return sum & 1 ; } Compile it with remarks enabled: clang -c baseline.c -O3 -g -fsave-optimization-record This produces baseline.opt.yaml next to the object file. Import the remark file into llvm-advisor rm -rf /tmp/adv-baseline llvm-advisor import baseline.opt.yaml \ --source-root . \ --store /tmp/adv-baseline Then start the server: llvm-advisor serve \ --store /tmp/adv-baseline \ --port 8080 Open http://127.0.0.1:8080 and press g r for the remarks view. The summarycard shows 137 remarks, and the top pass/name table immediately surfaces theproblem: Pass Remark Total Missed Passed Analysis loop-vectorize CantVectorizeLibcall 11 11 0 0 loop-vectorize MissedDetails 11 11 0 0 The heatmap shows the same thing grouped by function and line: And the full remarks grid shows the row for process : Code Explorer: reading the source with the remark overlay Press g e (or click Code Explorer in the sidebar), select baseline.c ,and filter the pass dropdown to loop-vectorize . The loop header on line 9 andthe assignment on line 10 are both highlighted with 11 missed remarks, exactlymatching baseline.opt.yaml : This is the same data as the remarks grid, but now it sits directly on thesource line that produced it. The raw remark If you open baseline.opt.yaml , the relevant entry is: --- ! Missed Pass : loop-vectorize Name : CantVectorizeLibcall DebugLoc : { File : "baseline.c" , Line: 10, Column : 12 } Function : process Args : - String : "loop not vectorized: " - String : "call instruction cannot be vectorized" Line 10 is the a[i] = work(a[i]) assignment. The loop cannot be vectorizedbecause it contains a function call that the compiler is not allowed to inline. The fix Remove the noinline attribute and make work static inline so the compilercan fold the call into the loop body and then vectorize it: #include static inline int work ( int x) { return x * 3 + (x >> 2 ); } void process ( int * a, int n) { for ( int i = 0 ; i n; ++ i) a[i] = work (a[i]); } /* main unchanged */ Recompile, re-import into a new snapshot, and look at the remarks again. Thetop pass/name table now shows: Pass Remark Total Missed Passed Analysis loop-vectorize Vectorized 13 0 13 0 The raw remark in optimized.opt.yaml confirms the loop was vectorized: --- ! Passed Pass : loop-vectorize Name : Vectorized DebugLoc : { File : "optimized.c" , Line: 8, Column : 3 } Function : process Args : - String : "vectorized " - String : "" - String : "loop (vectorization width: " - VectorizationFactor : "4" - String : ", interleaved count: " - InterleaveCount : "2" - String : ")" Snapshot diff: before and after Import both remark files into the same store and use the Compare view ( g c ): rm -rf /tmp/adv-compare mkdir baseline optimized cp baseline.opt.yaml baseline/vectorize.opt.yaml cp optimized.opt.yaml optimized/vectorize.opt.yaml llvm-advisor import baseline/vectorize.opt.yaml \ --source-root baseline \ --store /tmp/adv-compare llvm-advisor import optimized/vectorize.opt.yaml \ --source-root optimized \ --store /tmp/adv-compare llvm-advisor serve \ --store /tmp/adv-compare \ --port 8080 Select the baseline snapshot as BASE and the optimized snapshot as CANDIDATE . The diff shows one changed unit and an Optimization Impact tablethat breaks down the per-function change. In this run main has new missed andpassed remarks from the unrolled loop, while work is resolved because the callcan now be inlined: The diff answers the question “What changed in the remarks between the twobuilds?” without re-parsing files or writing a custom script. This diff workflow pinpoints exactly which remarks changed. On large projects,remarks can be overwhelming, but filtering, aggregation, and PGO hotness help youprioritize which ones to investigate. PGO hotness: which remark matters most? The vectorization example is tiny. In a real program, dozens of files can emit missed-remark warnings. PGO adds a profile-derived Hotness value toremarks, which gives you workload context and tells you which ones are worth fixing first. Small walkthrough: hot and cold loops To make the contrast easy to see, this small program calls hot_work onemillion times and cold_work one hundred times: #include #include int hot_work ( int * a, int n) { int s = 0 ; for ( int i = 0 ; i n; ++ i) s += a[i] * 2 ; return s; } int cold_work ( int * a, int n) { int s = 0 ; for ( int i = 0 ; i n; ++ i) s += a[i] * 3 ; return s; } int main ( int argc, char ** argv) { int n = argc > 1 ? atoi (argv[ 1 ]) : 100 ; int * a = ( int * ) malloc (n * sizeof ( int )); for ( int i = 0 ; i n; ++ i) a[i] = i & 0xff ; int total = 0 ; for ( int run = 0 ; run 1000000 ; ++ run) total += hot_work (a, n); for ( int run = 0 ; run 100 ; ++ run) total += cold_work (a, n); printf ( "%d \n " , total); free (a); return 0 ; } Generate a profile, then compile with profile use and remarks enabled: clang -fprofile-generate -O3 -g -fsave-optimization-record pgo_example.c -o pgo_train ./pgo_train llvm-profdata merge default.profraw -o pgo_example.profdata clang -fprofile-use = pgo_example.profdata -O3 -g -fsave-optimization-record \ -c pgo_example.c -o pgo_example.o Import pgo_example.opt.yaml and open the heatmap ( g h ). Clang inlines bothhelpers into main , so the hot loop at lines 6 and 7 appears under main andreaches 100% of the heatmap’s normalized scale. The cold_work loop is markedLow. In Code Explorer, filter by loop-vectorize to inspect the remarks on bothloops: With hotness, you can sort by actual runtime cost instead of by file name. How the tool makes this possible Capabilities are analyzer endpoints that each expose a different view of the compiled program - relational tables, heatmap aggregations, snapshot diffs, IR views, debug info, and more. Three new C++ capability analyzers turn raw remark data into the views above: Capability Output llvm.remarks.relational A columnar table of every remark, with deduplicated string tables for function, file, pass, and name. llvm.remarks.hotspot Per-function, per-file, per-line aggregations used by the heatmap. llvm.remarks.diff A delta of added, removed, and changed remarks between two snapshots. The relational endpoint uses integer-indexed columns instead of an array ofobjects. That keeps JSON payloads small and makes browser-side filtering fastfor millions of rows. A few performance numbers On real compiler output the analyzer sustains tens of thousands of remarks persecond: Source Remarks Parse time Throughput zstd_lazy.c 41,537 3.7 s 11,265 r/s sqlite3 amalgam 429,075 27 s 15,655 r/s Scale test: 572 translation units produced 10.7 million remarks in a single snapshot;the first relational query OOM-killed the server. Three fixes (splitting HTTP sends,per-unit fetching, streaming merger) reduced peak RSS from 10.7 GB to 5.3 GB. Those numbers are for YAML remark files. For large projects, Clang’s bitstream remark format ( -pass-remarks-format=bitstream ) is worth using instead: Format Source Remarks Size Parse time YAML llvm/lib/Support/APFloat.cpp 18,003 ~20 MB ~22 s Bitstream llvm/lib/Support/APFloat.cpp 18,003 ~2 MB Bitstream avoids text parsing entirely, it’s already in a binary form the advisor can read directly. The gap compounds across a whole build. Building llvm-project with -fsave-optimization-record=bitstream across its ~800 translation units produces tens of millions of remarks. As YAML that would be hundreds of gigabytes of text to re-parse on every import; as bitstream it stays in the low single-digit gigabytes and can be memory-mapped, so the advisor can query it without a multi-minute parse step. Acknowledgements and links Thank you to my mentors Tobias Stadler and Henrik Olsson for guiding methrough the summer, and to the LLVM community for the opportunityto contribute. Special thanks to last year’s GSoC team: Miguel Cárdenas , with mentors Johannes Doerfert and Kevin Sala ,for starting llvm-advisor ( his post )and for the initial foundation this work builds on. Pull Request: llvm/llvm-project#218692 GSoC 2026 final report: gist📝The LLVM Project BlogIf this page is useful, please consider donating a coffee
Sunday, November 22, 2026
C++ Programming with No AI, LSP, or Debugger: Ep20 -- Layout NDC Fail Part4🎥Zed A. Shaw
Lightning Talk: Generative C++ - Alon Wolf - C++Now 2026🎥CppNow
Elegant D - There’s More to Programming than Getting Code to Work🎥Northwest C++ Users Group
C++ Programming with No AI, LSP, or Debugger: Ep25 -- Making Thing🎥Zed A. Shaw
C++ thread_local Explained | Thread Local Storage, static vs thread_local & Real Use Cases🎥CppNuts
How a Theater Kid Turned Her Passion Into Event Production🎥C++ Alliance
Which C++ Best Practices Change When Writing Code with AI :: Amir Kirsh🎥CoreCpp
Kate Gregory: Don't memorize operator precedence - just use brackets #interview #coding #programming🎥MeetingCpp
FFTs Part 5: The FFT-20XX Complex-Input AlgorithmThis is part 5 of a series of posts about FFTs and the specific algorithms that FFT-20XX uses. The Discrete Fourier Transform The Basics of the FFT Some Optimizations to the FFT The Inverse FFT The FFT-20XX Complex-Input Algorithm (← you are here) The FFT-20XX Real-Input Algorithm(s) Over the last four posts, we dug into how the FFT works, various ways to compute it (some more efficient than others), and how to invert the process (to go from frequency space back into the time domain). Now it’s finally time to start in on the specifics of how FFT-20XX’s algorithms work, starting with the algorithm for fully-complex inputs (which, despite the name, is the simpler of the algorithms). Will this make any sense to anyone but me? Who knows. Will it even make sense to me 6 months after I write this? Who knows . If you’re still with me on this FFT journey, strap in, cuz here we go! The Requirements Before we start getting into how it works, I wanted to take a moment to spell out the properties I wanted FFT-20XX to have. For a variety of reasons, I wanted the following to be true: No scratch memory should be required. There are many (quite fast!) implementations out there that require writable memory in which to store temporary results. If doing multiple FFTs at once, this requires allocating scratch memory per thread, which is doable but I didn’t want to have to worry about that. I wanted the calculation to work completely in-place : it should be possible to write the outputs into the same memory that contained the inputs — that way without even needing a second buffer you can convert between time and frequency domains to do calculations, then convert back. At the API side, both the inputs and outputs should be in standard order (i.e. not bit-reversed). This requirement is true of most FFT algorithm implementations, but it’s worth calling out. Complex inputs (and outputs) also need to be packed complex numbers . That is, every pair of numbers in the input is a 2D real and imaginary pair (so the values are like "real0, imag0, real1, imag1, etc), and the same should be true of the outputs. I wanted to be able to make a single rotation table up-front for the largest-supported FFT size, where any smaller FFTs can use the same table as efficiently as if they had their own bespoke tables. I wanted it to be fast ! It doesn’t have to be the fastest implementation out there, but it has to at least sit in the ballpark with the others. Note For completeness: the functionality I sacrificed to achieve the above goals is that it only supports power-of-two FFT lengths . At the very least, handling that would make point #5 quite difficult, as the tables tend to be more bespoke for arbitrary sizes due to having a larger variety of required rotations. But I only needed to support power-of-two lengths for my use cases, so that’s all I did. There are many FFT implementations out there, but there are very few that support all of these. Many of the fastest ones require scratch memory or some up-front computation to figure out the best way to do the algorithm. My initial approach was to do a radix-4 decimation-in-frequency implementation with a bit-reverse pre-pass, with heavy SIMD optimizations for not only the computations through the middle, but also for the initial bit-reverse pass (which was written such that it could work in-place). This hit the first five points, but when I started timing it against others (specifically, the chowdsp FFT by Jatin Chowdhury, who wrote up a nice post about converting PFFFT to use AVX ), it was about 20% slower! So, clearly I had work to do. After some profiling, I noticed that the bit-reverse pass (even optimized as it was!) was taking up a large percentage of the runtime of the algorithm, so I started thinking about how to remove it (without losing the standard-in/standard-out ordering of the data). But first, we could use a better understanding of how to do an in-place bit reverse. Note The following discussion is all predicated on power-of-two sizes. There are general ways to do the same tricks, but I didn’t need to implement them so I can’t speak to good ways to do them. I’ll leave that for someone else. In-Place Bit Reversal In our previous example code, we always did the bit reverse out-of-place (requiring separate input and output memory), but it turns out it’s possible to do it as a wholly-in-place algorithm. Let’s arrange the indices (in both standard and bit-reversed orders) for a 16-element FFT in a grid, with labels along the top and left to show the memory indices: 0 1 2 3 0 0 1 2 3 4 4 5 6 7 8 8 9 10 11 12 12 13 14 15 Standard Order 0 1 2 3 0 0 8 4 12 4 2 10 6 14 8 1 9 5 13 12 3 11 7 15 Bit-Reversed There doesn’t seem to be a nice relational pattern here, but if we were to swap the middle two rows in both diagrams (note that we’re changing the view and not the memory ordering — this is the exact same data in memory as the previous set of diagrams), something becomes apparent: 0 1 2 3 0 0 1 2 3 8 8 9 10 11 4 4 5 6 7 12 12 13 14 15 Standard Order 0 1 2 3 0 0 8 4 12 8 1 9 5 13 4 2 10 6 14 12 3 11 7 15 Bit-Reversed Viewed this way, this is a matrix transpose ! In fact, any power-of-four FFT length (as every power of 4 is also a square ), can be viewed in this same way, by looking at the rows in bit-reversed order: 0 1 2 3 4 5 6 7 0 0 1 2 3 4 5 6 7 32 32 33 34 35 36 37 38 39 16 16 17 18 19 20 21 22 23 48 48 49 50 51 52 53 54 55 8 8 9 10 11 12 13 14 15 40 40 41 42 43 44 45 46 47 24 24 25 26 27 28 29 30 31 56 56 57 58 59 60 61 62 63 Standard Order 0 1 2 3 4 5 6 7 0 0 32 16 48 8 40 24 56 32 1 33 17 49 9 41 25 57 16 2 34 18 50 10 42 26 58 48 3 35 16 51 11 43 27 59 8 4 36 20 52 12 44 28 60 40 5 37 21 53 13 45 29 61 24 6 38 22 54 14 46 30 62 56 7 39 23 55 15 47 31 63 Bit-Reversed But what about a non-square length? This, interestingly, becomes two side-by-side matrix transposes: 0 1 2 3 4 5 6 7 0 0 1 2 3 4 5 6 7 16 16 17 18 19 20 21 22 23 8 8 9 10 11 12 13 14 15 24 24 25 26 27 28 29 30 31 Standard Order 0 1 2 3 4 5 6 7 0 0 16 8 24 4 20 12 28 16 1 17 9 25 5 21 13 29 8 2 18 10 26 6 22 14 30 24 3 19 11 27 7 23 15 31 Bit-Reversed Note For purposes of describing the FFT-20XX algorithm, we don’t need to know the above fact, I just thought it was neat. A nice thing about matrix transposes is that they can be done in-place (since every element — except the diagonals — simply swaps with another element). Here’s a bit of pseudocode to do this in-place bit reverse: void BitReverseInPlace ( complex [ ] data , int len ) { // fwiw there are fast ways to calculate this with // a known power of 2 using clz-style instructions. var rowCount = floor ( sqrt ( len ) ) // For power-of-4 lengths this will equal // rowCount, otherwise it will be // rowCount * 2 var colCount = len / rowCount for ( var row = 0 ; row rowCount ; row ++ ) { // using rowCount here because it's the size of // the square matrix for ( var col = row + 1 ; col rowCount ; col ++ ) { // The only difference from a standard square // matrix transpose, really, is that we're // bit-reversing the row indexing. var rc = BitRev ( row * colCount , len ) + col ; var cr = BitRev ( col * colCount , len ) + row ; Swap ( data [ rc ] , data [ cr ] ) if ( rowCount != colCount ) { assert ( colCount == rowCount * 2 ) // Do the second side-by-side transpose. Swap ( data [ rowCount + rc ] , data [ rowCount + cr ] ) } } } } Note There are, of course, more-efficient ways to do this. It is possible to make a nice cache-coherent, SIMD implementation of this (by using the same tricks people have found for doing standard matrix transposes), but we won’t actually need any of that. With this understanding of how an in-place bit reverse might work, we can finally get to: Eliminating the Bit Reverse Pass So far, we’ve predicated all of the discussion around the FFT on the fact that the algorithm either takes inputs in standard order and outputs values in bit-reversed order, or (as we formulated all of the sample code) the other way around: with the inputs in bit-reversed order and the outputs in standard order. But this is not strictly necessary. Naturally, as with many things in computer science, there are people who worked on this exact problem over 40 years ago. One person who definitely went down this rabbit hole is (the now, sadly, deceased) Clive Temperton, who wrote the 1982 paper “Self-sorting mixed-radix fast Fourier transforms” . Note It’s always fun to find a computer science paper old enough that it was done on a typewriter ! When we first built up to the FFT algorithm way back in part 2 , we noted that each step of the radix-2 FFT effectively does a deinterleave of the even and odd indices at that step, but also noted that doing an in-place deinterleave is a rough bit of work, so we’ll have to look for something else. One thing we can note is, for a given FFT length N N , the index has l o g 2 N log_2\,N bits, and thus there are ⌊ l o g 2 N 2 ⌋ \lfloor \frac{log_2\,N}{2} \rfloor bit reversals. For instance, a 4-bit index has 2 reversals (bits 0 ↔ 3 and 1 ↔ 2). A 5-bit index also has 2 reversals (0 ↔ 4 and 1 ↔ 3, with 2 remaining the same since it’s in the middle), 6- and 7-bit indices have 3 reversals, and so on. Basically, with a radix-2 FFT, there are l o g 2 N log_2\,N steps and half as many bit reversals (rounded down), so we could interleave single-bit reversals with the FFT steps. There are two orders that the reversals can be done in. One way would be to start with the outer-most bits and work our way in towards the center-most bits. Here’s the sequence of steps to do this for a 64-element FFT (note that we’re keeping the “matrix transpose” row ordering vs. natural memory ordering): 0 1 2 3 4 5 6 7 0 0 1 2 3 4 5 6 7 32 32 33 34 35 36 37 38 39 16 16 17 18 19 20 21 22 23 48 48 49 50 51 52 53 54 55 8 8 9 10 11 12 13 14 15 40 40 41 42 43 44 45 46 47 24 24 25 26 27 28 29 30 31 56 56 57 58 59 60 61 62 63 Standard Order 0 1 2 3 4 5 6 7 0 0 32 2 34 4 36 6 38 32 1 33 3 35 5 37 7 39 16 16 48 18 50 20 52 22 54 48 17 49 19 51 21 53 23 55 8 8 40 10 42 12 44 14 46 40 9 41 11 43 13 45 15 47 24 24 56 26 58 28 60 30 62 56 25 57 27 59 29 61 31 63 Step 1: Swap 1 ↔ 32 0 1 2 3 4 5 6 7 0 0 32 16 48 4 36 20 52 32 1 33 17 49 5 37 21 53 16 2 34 18 50 6 38 22 54 48 3 35 16 51 7 39 23 55 8 8 40 24 56 12 44 28 60 40 9 41 25 57 13 45 29 61 24 10 42 26 58 14 46 30 62 56 11 43 27 59 15 47 31 63 Step 2: Swap 2 ↔ 16 0 1 2 3 4 5 6 7 0 0 32 16 48 8 40 24 56 32 1 33 17 49 9 41 25 57 16 2 34 18 50 10 42 26 58 48 3 35 16 51 11 43 27 59 8 4 36 20 52 12 44 28 60 40 5 37 21 53 13 45 29 61 24 6 38 22 54 14 46 30 62 56 7 39 23 55 15 47 31 63 Final: Swap 4 ↔ 8 Each of these steps can be viewed as a collection of 2×2 matrix transposes : The first one does sixteen 2×2 transposes of individual elements (every 2×2 block of elements) The second does four 2×2 transposes, this time of 2×2 blocks (note the swap of the block containing “16, 48, 17, 49” and “2, 34, 3, 35”, for instance). The final step does a single 2×2 transpose of 4×4 blocks (swapping the upper-right and lower-left quadrants). The other order to do these in would be, instead, starting with the inner-most bits and going out from there (which I refer to, for purely comedic purposes, as the middle-out bit reversal): 0 1 2 3 4 5 6 7 0 0 1 2 3 4 5 6 7 32 32 33 34 35 36 37 38 39 16 16 17 18 19 20 21 22 23 48 48 49 50 51 52 53 54 55 8 8 9 10 11 12 13 14 15 40 40 41 42 43 44 45 46 47 24 24 25 26 27 28 29 30 31 56 56 57 58 59 60 61 62 63 Standard Order 0 1 2 3 4 5 6 7 0 0 1 2 3 8 9 10 11 32 32 33 34 35 40 41 42 43 16 16 17 18 19 24 25 26 27 48 48 49 50 51 56 57 58 59 8 4 5 6 7 12 13 14 15 40 36 37 38 39 44 45 46 47 24 20 21 22 23 28 29 30 31 56 52 53 54 55 60 61 62 63 Step 1: Swap 4 ↔ 8 0 1 2 3 4 5 6 7 0 0 1 16 17 8 9 24 25 32 32 33 48 49 40 41 56 57 16 2 3 18 19 10 11 26 27 48 34 35 50 51 42 43 58 59 8 4 5 20 21 12 13 28 29 40 36 37 52 53 44 45 60 61 24 6 7 22 23 14 15 30 31 56 38 39 54 55 46 47 62 63 Step 2: Swap 2 ↔ 16 0 1 2 3 4 5 6 7 0 0 32 16 48 8 40 24 56 32 1 33 17 49 9 41 25 57 16 2 34 18 50 10 42 26 58 48 3 35 16 51 11 43 27 59 8 4 36 20 52 12 44 28 60 40 5 37 21 53 13 45 29 61 24 6 38 22 54 14 46 30 62 56 7 39 23 55 15 47 31 63 Final: Swap 1 ↔ 32 They both end up with the same final result, and there’s not (at the moment) an obvious reason to prefer one over the other. Either way, any given step can take a 2×2 grouping of values and swap the elements on the diagonals, which we’ll leverage. We now know how to break this up into individual steps, but when should we do those steps? When To Do The Flippy Floppy There are many ways we can choose to group the bit reversals together. There are five somewhat obvious choices: Do them all at once at the beginning , before running the algorithm. This is what all the example FFT implementations in previous posts did. Do them all at once, at the end . This is a post-pass in-place bit-reversal. Because there are always half as many (rounded down) bit reversals as there are radix-2 passes, we could do them every other radix-2 pass (or, if we’re in radix-4 which has half the number of passes, once every radix-4 pass). We could do one per radix-2 pass for the first half of the FFT, then past the halfway point, there are no more reversals to be done and everything proceeds using the standard algorithm for bit-reversed inputs. We could do one per radix-2 pass for the last half of the FFT, so the first half would use the standard algorithm for standard-order inputs, before starting to swap things around. Obviously the first two options there are what we’re trying to avoid (doing the whole thing as one big pass), so we have three (reasonable) choices. As a 16-element decimation-in-time (DIT) FFT using the middle-out bit reversal, the other three options would look something like the following (with the filled boxes denoting where we’re doing a bit reverse vs. a standard FFT algorithm step): Note The goal here isn’t to be able to trace every single reversal, it’s just to demonstrate how the bit reversals “sit” in between the radix-2 passes for the different orderings. A butterfly diagram of a 16-element radix-2 FFT, where the inputs are in standard order. The first pass looks like normal, but then before the second pass there is a highlighted area representing the first bit reversal, where elements 2 and 3 swap with 4 and 5 (keeping their relative orders), and 10 and 11 swap with 12 and 13 in the same way. The rest of the elements remain unchanged through that section. After that is the next FFT pass, then another highlighted area, this one having elements 1, 3, 5, and 7 swap (keeping their relative orders) with elements 8, 10, 12, and 14. After that, the remaining two FFT passes proceed as normal, but unlike our other diagrams, the outputs are also in standard order, just like the inputs. " --> --> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 2 4 6 0 2 4 6 0 1 2 3 4 5 6 7 First-Half Bit Reversal An FFT diagram similar to the previous one, except the two bit reversal passes happen after the second and fourth FFT passes instead, evenly spaced (but in the same order relative to each other). --> --> 0 2 4 6 0 2 4 6 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 0 4 4 2 2 6 6 0 2 4 6 1 3 5 7 Evenly-Spaced Bit Reversal An FFT diagram similar to the previous two, except the two bit reversal passes happen after the third and fourth FFT passes instead. --> --> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 0 0 4 4 4 4 0 0 4 4 2 2 6 6 0 2 4 6 1 3 5 7 Last-Half Bit Reversal Ultimately, the algorithm we want is going to be doing things as radix-4, so the evenly-spaced one seems tempting. After all, there’s one reversal after each pair of FFT steps, which means there would be a single reversal for every radix-4 step. However, if we visualize it as a radix-4: A diagram of a 16-element radix-4 FFT with two FFT passes. Between the two passes is the first bit reversal, and after the second pass is the second (and final) bit reversal. Unlike every other FFT butterfly diagram we have had in this series, in this one the second pass inputs and outputs into each radix-4 computation are unevenly spaced. It looks kind of jumbled. --> --> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 4 6 1 3 2 3 6 9 Look at that second radix-4 step. Look at it. It’s weird . The nice, even spacing between radix-4 elements is completely gone, the relative angle indices are … scattered? And it just gets worse the larger the FFT sizes get. It’s probably possible to make this work, but it seemed like a pain, and I don’t know how well it would play with CPU caches or SIMD. That leaves either the first-half or last-half options, neither of which has that problem (they both, conveniently, keep the radix-4 steps even at each level). Of the two, it turns out the last-half reversal has a nice property (shared by the DIF algorithm we came up with in the previous post): similar angles are grouped together longer , which means there are a number of optimizations we can apply to that formulation that we couldn’t do with the first-half version. Note The optimizations in this case include loading the angles outside of the inner-most loop and special-casing the first few sets of radix-4 passes, since we have a memory-coherent group with no rotations, then one with only 90-degree rotations, etc. Also, it’s worth noting that it actually keeps the same sequence of butterfly strides (the spacing between subsequent inputs/outputs to the butterfly) that the standard algorithm has: each radix-2 pass has half the stride as the one before (which means each radix-4 pass has a quarter the stride of the one before). This makes the algorithm nice and regular to implement. Note The first-half reversal algorithm, by comparison, has a sort of “smaller then larger” layout where they roughly halve until the midpoint where they start doubling, ending with the same stride as the start. You can see this in the diagram of it above. So, that’s the core of FFT-20XX’s algorithm: radix-4, decimation-in-time, and with last-half bit reversal . Now, we just have to figure out how to do said bit reversals. How 2 Bit Reverse As mentioned above, because we’re radix-4 we will need to do two bit reversals per radix-4 step in the last half. Note This is mostly true, with one exception: for sizes like 64, 1024, etc. where there are an odd number of bits that reverse, the first radix-4 of the back half (rounded up) only needs to do a single bit reverse since there’s an odd bit pair to swap. Similar to how our example 1-bit-reverse-at-a-time squares above were the equivalent of doing a set of 2×2 matrix transposes, doing 2 bits ends up being the equivalent of doing a set of 4×4 matrix transposes . The obvious way to do this would be to run the radix-4 FFT step, then do a separate pass that does the bit-reversal transposes. But we can do better — without requiring a separate pass over memory — by doing the bit reversals and the FFT step at the same time. Here’s the beauty of the way this works: for any given radix-4 step with this method, the two bits that flip always correspond to the spacing between the radix-4 elements. To explain what I mean by that, here’s a standard radix-4 diagram again. In last-half bit reversal world, the only two reversals in a 16-element FFT happen after the whole algorithm completes, so the diagram (without the reverses in it) is the same: This is a standard radix-4 DIT FFT diagram, with the inputs in standard order and the outputs in bit-reversed order. 0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 2 4 6 1 2 3 3 6 9 0 0 0 0 0 0 0 0 0 0 0 0 Because we start from the middle bits and get to the outer bits last, the last radix-4 step will always be flipping the bits representing 1 and 2 (swapping them with the bits representing N 2 \frac{N}{2} and N 4 \frac{N}{4} , respectively), which will always be the spacing of elements in the last radix-4s (by this I mean, if you look at the first radix-4 of the last step, its indices will be 0, 1, 2, 3 — which is just every on/off combination of the bits for 1 and 2). The next-to-last radix-4 step (for FFTs sized 256 and larger) involves the bits for 4 and 8. Note that, in our 16-element diagram above (which doesn’t have this bit reverse but still illustrates the point), the first radix-4 butterfly has indices 0, 4, 8, 12 which, like the previous example, is just every on/off combination of those two bits. The step before that (for even larger FFTs) would involve flipping the bits for 16 and 32, with butterflies where the spacing is 0, 16, 32, 48. This pattern continues happily no matter how large the FFT ends up being. In the last step in our 16-element example, bit 1 swaps with bit 8 and bit 2 swaps with bit 4, and there just so happens to be a butterfly that starts at 4 and one that starts at 8. What this means is: the smallest bits in a flip correspond to the spacing within a given radix-4 computation , and the largest bits in a flip correspond to the starts of radix-4 passes . Thus, there are exactly four evenly-spaced radix-4 butterflies involved in every 4×4 transpose . Here’s a diagram of four butterflies (A through D) in their input order, and their post-transform order, which is exactly what the bit reversal is doing (with some color highlighting to make the butterflies clearer): A0 A1 A2 A3 B0 B1 B2 B3 C0 C1 C2 C3 D0 D1 D2 D3 Unflipped A0 B0 C0 D0 A1 B1 C1 D1 A2 B2 C2 D2 A3 B3 C3 D3 Flipped So, for each radix-4 step that does a two-bit reversal, we can instead run four radix-4 butterflies at once , and then transpose the elements within them before writing them back out to memory, doing the whole thing in one read/write pass! Note Doing this can just barely fit within the 16 registers that x64 SIMD (pre-AVX-512) provides, with some trickery involved around when to load from and store to memory. Final Algorithmic Details There are two more details that need to be handled, before the algorithm is fully described. First is, for non-power-of-four lengths, where do we put the single radix-2 pass ? This one has an easy answer: it can go anywhere in the first half ! (If it were to go somewhere in the last half, it would mess up the nice alignment of radix-4 element spacing and bit reversals we were going over in the previous section). For FFT-20XX, I ended up putting it directly after the very first radix-4 pass (as that first pass is nicely special- cased and optimized due to having no complex rotations). Note In fact, it was tempting to make the first pass a radix-8 pass, given that, in addition to the 8 complex components (16 values: reals and imaginaries), there only needs to be a single 2 2 \frac{\sqrt{2}}{2} factor loaded, and it would avoid a whole pass over memory. There wasn’t a way to get that all to fit in the 16 x64 SIMD registers (I was, annoyingly, able to get it down to needing 17 registers), and it ended up running slower — even at large FFT sizes — than just doing it as a radix-4 followed by a radix-2. On ARM, however, where there are 32 registers to play with, this would probably work nicely! Next, there’s the single-bit flip for FFT lengths with an odd number of bits that flip (for instance: a length of 64, which has 6-bit indices and thus 3 bits that flip, or 128 which has 7-bit indices which also has 3 bits that flip — with one that stays stationary in the middle). It turns out this case is actually two cases: power-of-four and non-power-of-four FFT lengths. For power-of-four lengths , we catch a nice break: the two bits that flip just so happen to be the middle two elements of each butterfly ! For example, for a 64-length FFT, there are 3 radix-4 steps. The second step contains the single-bit flip, and the first radix-4 butterfly has indices 0, 4, 8, and 12. And it turns out that it’s the bits representing 4 and 8 that are flipping, so we actually only need to load a single radix-4 butterfly , then just write the inner two elements out in reverse order. Nice! For power-of-two lengths , we’re not that lucky. But it still only requires doing two radix-4 butterflies at a time , and the second and fourth values from one swap with the first and third values of the other (as there are two 2×2 matrix transposes within each pair of butterflies): A0 A1 A2 A3 B0 B1 B2 B3 Unflipped A0 B0 A2 B2 A1 B1 A3 B3 Flipped So here’s a rough breakdown of the whole algorithm: For the first half (rounded down) of the radix-4 steps in the algorithm, proceed as normal, with the inputs in standard order. Unimportantly, I put the radix-2 step after the first radix-4, just because it was easy. If the FFT length has an odd number of bit flips: If it’s a power-of-four length, do a pass just like a standard one, except where the middle elements of each radix-4 are written in reversed order, to do the single bit flip. Otherwise, load the two relevant radix-4 butterflies, compute them both, then swap the second and fourth elements in the first with the first and third elements in the second before writing them out. After that, each step loads four radix-4 butterflies at a time, computes all of them, then does a 4×4 matrix transpose of their elements (while still in registers!) and writes those out. The devil, of course, is in the details (for instance, this simple description doesn’t go into the angle indexing — but it’s actually reasonably straightforward and regular!), but this is the high level of the algorithm! Snark! …if this many words can be described as just the “high level” overview of anything. SIMD Considerations This section will be light on specifics, but it’s worth going over a few of the SIMD considerations that went into the implementations. The first thing is that, as mentioned in the requirements at the start of this post, the inputs and outputs to the complex FFT functions use packed complex numbers . For SIMD efficiency, the very first step does a deinterleave during its loads , to get a SIMD vector of all the reals and a second vector of all of the imaginary components for each. As an example, for a 4-element SIMD type, it would load r0, i0, r1, i1, r2, i2, r3, i3 into two vectors: vR = r0, r1, r2, r3 vI = i0, i1, i2, i3 Then, for intermediate steps, it stores those 8 neighboring values directly, without re-interleaving them (as they stay neighboring in blocks like that until the very end). Only on the very last step does it re-interleave while writing the final results. Next, because of the way the angles are arranged (with like angles grouped nicely together), each radix-4 SIMD butterfly only needs a single set of three angles (though, when doing two or four at a time due to the bit reversals, each butterfly has its own set of three angles, so for the double-bit-reversal case there are actually 12 angles, total). Note I’m saying 3 angles as that’s the canonical way, but on x64 it actually only does two angles, doing instead a “radix- 2 2 2^2 ” computation and taking advantage of the speed of the FMA instruction, which allows it to do technically more calculations than the canonical version, but in less cycles. I’ve mentioned it in previous posts, but this trick is nicely described in The ryg blog . This stops being true right around the end of the process: the very last step (for all SIMD sizes) ends up requiring a SIMD set of distinct angles, as the grouping of the angles has finally gotten down to a single element (each butterfly in the final step has a unique set of angles). Note For larger SIMD sizes like AVX, the second-to-last step also needs to be special-cased, as it involves flipping bits 4 and 8. For AVX, for instance, each 8-element SIMD butterfly set contains two of the four radix-4 butterflies, in the first and last halves. Finally, smaller FFT sizes tend to need to be special-cased. 8-element and smaller FFTs are just done in scalar (I doubt anyone is going to be perf-constrained by not having those tiny FFTs be SIMDed). And, for AVX’s 8-element vectors, 64-element and below will fall back on the SSE2 implementation. The final pass also needs a different implementation for 2-element and 4-or-more-element SIMD vectors. That’s Complex! That is a hopefully-coherent rundown of how FFT-20XX’s complex-valued algorithm works! The algorithm itself isn’t that much more involved relative to a standard FFT implementation, but dropping the bit-reverse prepass (even after having heavily SIMD and CPU-cache optimized it) ended up getting FFT-20XX to be between 1.2 and 1.8x as fast as the chowdsp FFT that I was using as my baseline (tested at FFT lengths of 64 through 524,288), with the AVX implementation! (The SSE2 and NEON implementations end up 1.1 to 1.5x faster than chowdsp). It hits all of the requirements: it works completely in place with no scratch memory needed, keeping the inputs and outputs in their natural order, and is fast (or at least, fast enough)! And it manages to do that all without an explicit bit-reverse pass! Note The inverse complex FFT, which I haven’t mentioned at all in this post, uses the same algorithm with the rotations reversed (switched via C++ templates), with the 1 N \frac{1}{N} scale applied during the final radix-4 before saving the final results out. In the next (and, thankfully, final ) post in this series, we’re going to tackle the final boss of the whole project: the real-input FFT (and its inverse), which ended up being way trickier than I expected.📝JoshJers' Ramblings
Sitting Is OverratedLet’s stop pretending: Sitting is overrated. Everyone knows it’s bad for your spine, yet people keep doing it, almost as if there’s a society-wide conspiracy to make people sit on their ass for 8 hours and fiddle with spreadsheets all day. Stop sitting. The next time you sit down, ask yourself what you are trying to accomplish. Are you tired and want to rest? Just lie down. Are you planning to get work done? Stand. Or better yet, do it while walking. The world has been made for you. The grass longs to touch your feet. All the best thinking happens while moving . No great thought was ever had while sitting on a chair. “But Mond, what about my work?” We have the technology: standing and walking desks. Just buy a cheap one for like 100 bucks, then replace it with one ten times as expensive once you’re ready to level up your standing game. Or y’know, if you want to embrace lying down in your life, Horizontal Lazy Glasses 90 Degree for Lying Down Reading or Watching TV,Knitting Up Neck Relax, Prism Glasses for Looking Up Playing Mobile,Lightweight and Smooth Comfortable Frame Clear Vision exist for a reason. It’s what all the professionals use. “But Mond, how am I supposed to eat?” Either lie down and revel in a decadent late Roman Republic orgy, with lavish grapes and obscene delicacies, or just eat while standing or walking. It helps with digestion. It’s either-or. Commit to relaxation or commit to action. This maxim you should apply to all things in your life. What I’m saying is that sitting is for people who don’t commit . Whenever you sit down you sit on the metaphorical corner cuck chair of life. You watch while other people relish joy, pleasure and relaxation on the bed, couch or floor, or are running and jumping with pure energy. Don’t be that guy. Reject the corner chair. Do not allow society to pressure you into cuckolding yourself on a metaphorical level. Social pressure isn’t real. Fuck it, we ball, you can just do things. Leave the state of indecisiveness. Either you are RESTING or you are MOVING. Sitting is the awkward in-between state that’s uncomfortable, bad for your back, and all-around worse than each of the available alternatives on most metrics. Lying down is better for any rest. Sitting is the poor man’s lying down. It’s for the minimum-wage employee whose only source of comfort is a horrid bright-yellow plastic chair which they’re only allowed to use for 5 minutes at a time, and only in regular 60-minute intervals. You deserve better than that. Any floor can be your comfort zone if you are just willing to claim it. Squatting, on the other hand? Fuck yeah. You go so hard if you do a full heels-on-the-floor squat. It’s exercise. It’s good for you. 11 PM slavsquat on a park bench in your Adidas tracksuit, vodka on your left, cig in hand, Boris vibing as hardbass rattles from his phone speakers. Walking? It’s exercise. Keeps you warm and nimble, and the weight off. It feels better. And yes, I do in fact genuinely prefer to eat and talk while walking. I will take it over doing it while sitting any day of the week. You are a king. You are a cat. You are a 4000-pound anti-terror combat machine with hydraulic motors, thermal-guided armor-penetrating missiles and steel plating. Act like it. Own the place. Sprawl out. Spread yourself across the scenery like you’re butter on toast. That couch is yours . If there’s no couch, claim the floor. Just vibe. Lie down. If there’s no space on the floor, ascend to the heavens and become one with the ceiling.📝MOND←TECH MAGAZINESaturday, November 21, 2026
The Performance Mindset - Mathieu Ropert - ACCU 2026🎥ACCUConf
Is Your AI Model Lying to You? The Reproducibility Problem🎥CppCon
Printf in C is so BAD I had a Crash Out🎥Tsoding
Kate Gregory: I can tell a coder's mood by their code #interview #coding🎥MeetingCpp
Letters of GratitudeGiacomo Balla, Dynamism of a Dog on a Leash (1912). In August I received the following e-mail: Hello! I was reading your latest post, when I came across a self-deprecating line: «The three people who follow this blog will already know…» This prompted me to remember an advice by Lionel Dricot and to message you that I am one of the people who follow you and really appreciate your writing. Your style is very soft and engaging, and the subjects you pick interested me every time. I share your posts with my friends as much as possible. Thanks for your work and please continue! It made me happy. It’s nice to be read. It’s nice to know that you are creating something, and that someone out there is appreciating it. (I received a few others over the months, and appreciate every single one of them. This here stuck with me due to its advice line.) Lack of feedback is one of the perils of being a personal website-style blogger. It’s a static site, there’s no “comment section”. You never see anyone react to what you wrote. In fact, by default no one sees what you wrote . You have to post it somewhere, feed it to some sort of algorithm or community that might be interested in reading it, otherwise no one will ever see it. But even if your post ends up at the top of some obscure subreddit, or is trending on Hacker News, it’s not particularly personal. You don’t really know who the people who liked your post are, if they have any associations with you, if they care for who you are, for everything you write about, or just about one single specific thing you wrote about once a few years ago. It’s a bit frustrating, but that’s the state of things. You can’t really fix that. You could ask people who visit your site to fill in a survey, if you want to be completely insane. Anyway. I decided that I should start sending people letters of gratitude. Similar to the one I received. Perhaps aimed at people from my past, and people online whose work I appreciate. It’s been slow going. I assembled a list, told myself I’d do one letter a week, set up reminders and then repeatedly failed to act on them. Why? Well, I had some good excuses: I was getting my driver’s license, had to sort out a whole bunch of bureaucratic nonsense, was preparing for Inkhaven, and so on, and so on. Overall though, there’s a big elephant-shaped elephant in my room and it has the letters ‘A’ ‘D’ ‘H’ ‘D’ written onto it. I’ve had a prescription ever since middle school. It was rough. Still is, to be honest. “Picking up a new weekly commitment that is optional, falls out of your usual range of behavior, and is not well-suited to hyper-focus-maxxing” is one of those ADHD-traps, see also maintaining reading or workout habits. It’s, uh, a little bit like “the phone call thing”, which a lot of people struggle with. Not quite though. Just a lot of inertia to get started on it. It’s so optional. What makes it worse is that “forcing myself to do things I don’t want to do” is a whole other thing I’m trying to be wary of. Here, I know that I appreciate such e-mails. I like the element of connection. I like to learn a little something about those who read my stuff, or care for me online. And let’s be fair, it’s also a little ego boost to hear that someone cared enough to send you a message. So based on that, I should do my part: I should be sending e-mails to those whose work I appreciated, for any reason. To people (say, teachers) who had a positive impact on me, and helped me get where I am today. On the other hand: How do I do it without feeling like I have to force myself? When is “forcing myself to do something for the sake of someone else” the right thing to do(tm), and will have me feeling better afterwards, and when is it just exhausting or draining or worse, not even something they will appreciate? I don’t really know, but there’s one helpful call I can make here: Working through the people who had an impact on my life is a good way to help me sort out my own past, and go over complex feelings, or reflect on how I ended up where I currently am. Where am I? Well, right now Berkeley, usually Seattle, and in either case I am somewhere where I am happy . I don’t think I could’ve gotten here without having people in my life who helped me, and lifted me up. Now that I’m at Inkhaven (30-day writing retreat) it’s a good time to pick this back up, and to draft a few letters. Today I wrote (and sent!) the first one. It is for a professor of mathematics who taught the very first university class I ever took. Great man. Uncompromising. Practically ran into the lecture hall, since he was always full of energy. Told us he was unable to cut the material any further, so there was going to be a lot. No online notes, blackboard only. Told us that it was going to be tough, but that he believed in us. I believed in the him that believed in me. School never taught me how to put in any effort at all, and I knew that this here, the jump to university, was the one and only opportunity I’d have to learn how to focus and study. God, it was so hard. It was brutal. We lost ~50% of the students within the first two weeks. Around 25% of the students passed the final exam. I barely passed. One of the best lectures I ever had. Exceptional man. Showed me that yes, mathematics is beautiful. How would it have been possible to make the course any smaller? All the material was necessary. A class on linear algebra requires the spectral theorem and the Jordan normal form. Put the bar high, and your students will rise to the challenge. Well. Some of them, anyway. At the risk of ranting about the absolute state of academia, I wish we gave young students more opportunities to prove themselves early, and motivated them by showing them what we truly care about , and letting them participate. Children are perceptive, they know if you do not care about the material you are teaching. Not all children care about everything you do, but some of them will. So, the letter. I wrote it, and it was fine. It was good once I’d started. It wasn’t exhausting, it was just the initial inertia and “oh god there is so much stuff going on”. I sent it off, and I was happy with it. Let’s see if I can write one or two more before Inkhaven is over.📝MOND←TECH MAGAZINEFriday, November 20, 2026
ITK 5.4.8: Concurrent IO, Correct DICOM Geometry, and Sturdier Python WrappingWe are pleased to announce the release of ITK 5.4.8! ITK 5.4.8 is a maintenance release for this cross-platform, open-source toolkit for N-dimensional scientific image analysis with spatially-aware algorithms. This release focuses on correctness, concurrency, and compatibility. It removes a MetaIO deadlock that could stall heavily multithreaded reads, fixes DICOM series geometry when slice spacing […]📝Kitware Inc
Lightning Talk: The Unanticipated Allocator - Jeff Trull - C++Now 2026🎥CppNow
Another failed attempt to get the icon for the icon for the .. parent folderTrying to generate a path that turns out to be invalid. The post Another failed attempt to get the icon for the icon for the .. parent folder appeared first on The Old New Thing .📝The Old New Thing
Same Bits Without Losing MIPS: Reproducible Numerics at Full Hardware Speed - Andrew Drakeford🎥CppCon
Decoding base64 email attachments: a speed ranking of programming languagesEmail attachments are base64. So are cryptographic PEM certificates. In both cases the text is broken into lines, 76 characters for email and 64 for PEM. Skipping line endings sounds trivial. Yet many fast decoders only work on uninterrupted base64. As soon as they meet a line break, they fall back to a slow path. … Continue reading Decoding base64 email attachments: a speed ranking of programming languages📝Daniel Lemire's blog
Real-Time AI Audio Processing at Scale - Building Cloud-Native Audio Applications - Vishal Alhat🎥audiodevcon
chrono_literals, units, and comparison | Modern Cpp Series Ep. 253🎥Mike Shah
What are the implications of a proof of the Riemann Hypothesis?tl;dr : No practical implications. Why not? Because human mathematicians spent decades pricing in all practical implications. This will not be the case for future research. Future research will have practical implications. If you’re reading this you’ve probably already heard the news: Levent Alpöge + Claude are claiming a proof of the Riemann Hypothesis . Lean formalized, but even compiling the whole thing apparently takes a few hours. Understanding it will take longer. Now, let’s assume the result holds up. Friends of mine are confused, and unsure what any of this even means. But mond, they say, what are the implications? What does any of this shit mean? Why care? Many such cases. The Riemann Hypothesis is one of the Millennium Prize Problems , and one of the most famous mathematical conjectures in history. It’s a big deal. It’s like a physics result saying something exciting about quantum gravity, or putting a man into orbit for the very first time. The ELI5 is that the Riemann Hypothesis states that the distribution of the prime numbers is as regular as possible. Basically, a pattern in number theory is that as you walk up the number line, prime numbers seem to show up “randomly”. You can’t predict the next one. At the same time, they are evenly distributed, so there are no weird gaps or lumps. The Riemann Hypothesis is a formalization of this. Do not try to understand it on any deeper level unless you have a math degree, it’s not really worth it. Watch the 3Blue1Brown video on the Riemann Zeta function. If you want to be nerd-sniped after that, look at this paper for a simple elementary statement that’s equivalent to the Riemann Hypothesis. but mond what are the practical implications? There are none! No, seriously. There is no practical impact of a proof of the Riemann Hypothesis on your daily life. Because it’s about prime numbers, the Riemann Hypothesis does have implications for the field of cryptography, but they are minor. It formalizes a statement that everyone already assumed to be true . Consider the hypothetical: Imagine you were to develop an algorithm that broke cryptography (this would fundamentally reshape all of society), but which only works if the Riemann Hypothesis is true. You can always just run the algorithm ! Either you manage to decrypt my encrypted hard drive, or you don’t. In other words, you can just assume that the Riemann Hypothesis is true . The Riemann Hypothesis doesn’t tell you “how to do X”, it tells you that the prime numbers are evenly distributed. It irons out, formalizes a few details. This type of stuff is normal. For example, we have no idea whether all the modern encryption that we use is “truly safe” . We don’t have a proof. Society rests on this assumption. This is, on some level, what P vs. NP is about. We cross our fingers and hope that it works. Some proofs could show us “a new way of doing something”. P vs. NP is of this type. A proof of P = NP could break all modern encryption. The Riemann Hypothesis is not of this type, it asks whether a pattern is regular (we assume it is). The impact could still be there, but mathematicians have done decades of pricing in all possible future worlds, so we can largely rule it out. ok but why do we care? This says something about AI capabilities. “Solving one of the greatest unsolved problems in any academic field” is a massive deal, and demonstrates how AI systems are improving at a rapid, exponential rate. Please understand that, say, a year ago or so, people had timelines such as “AI assistance may be able to prove a result like the RH by 2050”. Tao, 2025 : “Problems like the Riemann hypothesis, those are so far out of reach”. A year prior AI was barely capable of doing basic mathematics. In other words, the world of mathematics will never be the same. Mathematics is what drives computer science, physics, and eventually robotics. An AI capable of solving one of the greatest unsolved intellectual problems can do a lot more than that, including the development of algorithms capable of steering arbitrary robots and drones autonomously. Consider that this was a hypothetical, and people thought an AI proof of the Riemann Hypothesis was absurd at the time. You should consider panicking a little bit, and asking yourself what this means. Understand that even if “the problem is capitalism”, this does not change that you live in a capitalist society. Accept that Eliezer Yudkowsky may have been right all along. Listen to Daniel Litt . Then, stop panicking and take measured, principled steps. Relax. Take a few deep breaths. Express your delicate and beautiful soul. This is the time. wait, but what will happen next? You simply must understand that The only reason why we know that a proof of the Riemann Hypothesis has no practical impact is because mathematicians spent decades building on top of it, and analyzing all future outcomes. This will not be the case for all future AI research. Right now AI research, as far as mathematics is concerned, is still in the realm of “picking off famous open problems”. It’s fame-seeking, racing. It’s aura-farming . It’s proving to the world that AI is the real deal. Because it is attacking problems that are understood and theoretical, the outcome is already priced in. What you should be scared of is the future world in which AI systems will be thrown at novel problems, and practical problems. The world in which AI research will release sudden, mind-bending results that have implications which human society is not prepared for, since everything about them is novel. Current research happens at the frontier of what humans have already been trying to understand for decades . Future research happens in the dark realm where humans have not set foot. Where opinionated AI steers the theory-building. This could be novel methods for breaking encryption, in some form or another. It could involve novel quantum algorithms and results. It could be results in theoretical physics. It could be novel results in control theory and robotics, or micro-scale engineering, or chip design. William Blake, Newton (1795). It may take weeks for human mathematicians to understand “how” the new proof works. As everything accelerates, human society may be stuck in an eternal state of “catching up”, with very little control over the boundary of research moving ahead of us. In that world, broken encryption, novel engineering methods, etc. will force humanity to use more artificial intelligence to smooth out the impact AI is already causing. This is what’s already happening in software engineering: Artificial intelligence is used to discover vulnerabilities in all critical software. Human maintainers end up overwhelmed with tickets, CVEs, critical flaws, and resort to AI tooling to resolve them. Control is handed off, one field at a time, and the resulting system escapes the horizon of human understanding. The world changes . Power transfers. First slowly, then all at once.📝MOND←TECH MAGAZINEThursday, November 19, 2026
FFTs Part 4: The Inverse FFTThis is part 4 of a series of posts about FFTs and the specific algorithms that FFT-20XX uses. The Discrete Fourier Transform The Basics of the FFT Some Optimizations to the FFT The Inverse FFT (← you are here) The FFT-20XX Complex-Input Algorithm The FFT-20XX Real-Input Algorithm(s) In the last post we looked at ways to make the core FFT algorithm more efficient. Before we (finally!) get to the actual FFT-20XX algorithm, it’s worth going over how the inverse FFT works. But to do that, we need to first take a detour into the decimation-in-frequency (DIF) FFT . I hope you’re ready for some more diagrams because we’re about to dive in. Note In this post we’ll be focusing on radix-2 because it’s the simplest form to reason about, but all of this applies to other radixes as well. Flipping Our Focus Last time we started graphing the data flow of the FFT algorithm (using semi-standard butterfly diagrams ). The radix-2 decimation-in-time algorithm ultimately ends up looking like this: The diagram of a radix-2 FFT from the previous part, showing the four stages of the algorithm and how they interleave, with the input indices in bit-reversed order and the output indices in sorted order. " 0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 4 0 4 0 4 0 4 0 2 4 6 0 2 4 6 0 1 2 3 4 5 6 7 If you remember back in part 2 , we visualized the rotations for a length-8 FFT, and split things into even/odd inputs and first/last halves of the output. We can, instead, visualize the same rotations, but switch to looking at even/odd outputs and first/last havles of the inputs (effectively transposing the breakdown we did before): in[0] [0] in[1] [1] in[2] [2] in[3] [3] in[4] [4] in[5] [5] in[6] [6] in[7] [7] out O [0] = + + + + + + + out O [1] = + + + + + + + out O [2] = + + + + + + + out O [3] = + + + + + + + out O [4] = + + + + + + + out O [5] = + + + + + + + out O [6] = + + + + + + + out O [7] = + + + + + + + Note I’m going to go through this faster than I did the first time, in the hopes that having already done a similar set of steps once, it’s clearer what’s going on this time. Similar to part 2, we’ll group the evens and odds (this time, outputs instead of inputs), and make the rotations in the second half of the odd outputs be a negation of the first half’s rotations: in[0] [0] in[1] [1] in[2] [2] in[3] [3] in[4] [4] in[5] [5] in[6] [6] in[7] [7] out O [0] = + + + + + + + out O [2] = + + + + + + + out O [4] = + + + + + + + out O [6] = + + + + + + + out O [1] = + + + - - - - out O [3] = + + + - - - - out O [5] = + + + - - - - out O [7] = + + + - - - - Now, we can note that for a given output, the first and last half inputs have the same rotations (i.e. inputs 0 and 4 have matching rotations, 1 and 5, etc), with the evens being summed and the odds being subtracted. We can pre-add (for the evens) and pre-subtract (for the odds) these to get two 4x4 blocks, first the evens, which is just a standard 4-element FFT: [0]+[4] [1]+[5] [2]+[6] [3]+[7] out[0] = + + + out[2] = + + + out[4] = + + + out[6] = + + + Then the odds which, like in part 2, are a little bit different: [0]−[4] [1]−[5] [2]−[6] [3]−[7] out[1] = + + + out[3] = + + + out[5] = + + + out[7] = + + + In this case, before doing the sub-FFT, we can rotate the inputs to the sub-FFT to get it in standard N 2 \frac{N}{2} -length FFT form: × × × × ([0]−[4]) ([1]−[5]) ([2]−[6]) ([3]−[7]) out[1] = + + + out[3] = + + + out[5] = + + + out[7] = + + + This effectively puts the add/sub step first at each “level”, then the rotation afterwards (to feed into the next sub-FFT). Because of the way that the divisions into sub-FFTs happen based on outputs rather than inputs, this results in a graph that looks like the DIT diagram, but flipped horizontally: A diagram of a 16-element decimation-in-frequency FFT, showing the four "stages" of processing and how they interleave. The flow of the diagram and the angles are the same as the decimation-in-time version, but in reverse. 0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 0 0 0 0 0 4 0 4 0 4 0 4 0 2 4 6 0 2 4 6 0 1 2 3 4 5 6 7 Where decimation-in-time started with smaller sub-FFTs and then built up to the full one, each step of decimation-in-frequency instead does a computation pass on its inputs and then splits them up into sub-FFTs after, such that the last step of the radix-2 DIF is just a set of standard length-2 FFTs. The computation pass is also different: rather than rotate the odd input before the addition and subtraction, DIF instead does the add/sub first then rotates odd output . This is why the rotation (twiddle) factors in the above diagram are on the right-hand side of the butterflies instead of the left. Despite looking almost like its reversal, this actually computes the exact same outputs as the DIT FFT given the same inputs (ignoring floating-point error, for the pendantic. Yeah, I see you). Note that, as formulated here, the diagram starts with the inputs in-order and ends with the outputs bit-reversed ; this is a consequence of the alternate way we broke down the algorithm. It’s still possible to do the bit-reverse on the inputs so the outputs come out in-order, however. If we rearrange the inputs and outputs in the diagram accordingly, we get the folowing: Diagram of a radix-2 decimation-in-frequency FFT, with the inputs in bit-reversed order and the outputs in natural (sorted) order, just like the original decimation-in-time diagrams. The angle indices in each stage are in bit-reversed order as a consequence of this reordering. 0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 4 2 6 1 5 3 7 0 0 4 4 2 2 6 6 0 0 0 0 4 4 4 4 0 0 0 0 0 0 0 0 Just to reiterate: the above two diagrams are functionally identical , it is simply a matter of visualizing them with different input/output orderings. We now have enough information to turn this into a routine that — like the DIT version — does the bit reversal on the inputs before computing the result in-place. Here is some pseudocode: void CalculateDFT ( complex [ ] inputs , complex [ ] outputs , int len ) { if ( len == 1 ) { outputs [ 0 ] = inputs [ 0 ] return } BitReverseCopy ( inputs , outputs , len ) for ( int span = 2 ; span len ; span *= 2 ) { for ( int groupI = 0 ; groupI len / span ; groupI ++ ) { var * data = & outputs [ groupI * span ] // We can pull the twiddle lookup/calculation // out of the innermost loop. Note the bit // reversal in the index lookup. var twiddle = Twiddle ( BitRev ( groupI , len ) , len ) for ( int k = 0 ; k span / 2 ; k ++ ) { int kOdd = k + span / 2 complex even = data [ k ] complex odd = data [ kOdd ] // Note the post-rotation here vs. the pre- // rotation that DIT does. data [ k ] = even + odd data [ kOdd ] = ( even - odd ) * twiddle ; } } } } This code is very similar to the DIT version; the main differences are the bit-reversed angle lookup and the rotation of the output of the computation pass instead of rotating the inputs (again, a consequence of doing the even/odd split on the outputs instead of the inputs). Note On systems without a fast fused multiply-add (FMA) instruction, this DIF formulation ends up being a really nice choice! However, there’s a trick using FMA mentioned in a note in part 3 (which is broken down nicely on The ryg blog ) which, sadly, does not work with the DIF’s post-rotation. A nice thing about the DIF formulated this way (with the bit reverse first) is that it lets the angle lookup move outside of the innermost loop (as you can see above). This is especially nice for radix-4 implementations where the table doesn’t store the 3 k 3k angles and they’re built via a multiplication, as the multiplication itself can move out of the inner loop. The other interesting thing is that, with the angle lookups in bit-reversed order, you can store your table of rotations in bit-reversed order as well and, when stored this way, you automatically get nice cache-coherence for the smaller FFT types. If you look at the above butterfly diagram, the first angle is always 0, the second is always a quarter turn (it’s 4 16 \frac{4}{16} in the above diagram, and for a length-8 FFT it would be 2 8 \frac{2}{8} , which is equivalent), and so on. So with an arbitrarily-large FFT table, any given (power-of-2) sized FFT of length N N would just use the first N 2 \frac{N}{2} elements of the table. Note These properties are also true for DIT implementations where the bit reverse is done at the end instead of on the input. That’s decimation-in-frequency! It ends up being a near-reversal of the way that decimation-in-time works, yet still computes the same result. Now that we’re through that, we can finally get to: The Inverse FFT Breaking a (time domain) signal down into its frequency components is pretty handy (you can use it to write cool visualizers, for instance!), but it’s even more useful if you can go from frequencies back into time-domain samples , letting you convert your audio into frequencies, manipulate them in some way (like an EQ ) and then turn it back into samples that can be played back or encoded as normal. The FFT (and the DFT in general) is really a linear system, which means it can be inverted , so we can make a transform that takes the output of an FFT and gives us the original inputs. This is the inverse FFT (IFFT) . To figure out how to do this, let’s start with the simplest useful case: a single DIT radix-2 pass (with an arbitrary angle k k ): Diagram of a 2-length FFT, showing the two inputs going into a single processing node, then back out to the two outputs. The second input node has a "k" representing the fact that it is rotated by an unspecified angle. 0 1 0 1 k There are effectively two steps here: Rotate input 1 by k k . Add/subtract input 0 with the rotated input 1 to get the two outputs. To invert this, we need to undo these two steps (in the opposite order as we did them). Undoing the addition/subtraction is first, and this one is easiest to do algebraically. If we have these two equations: y 0 = x 0 + x 1 y_0 = x_0 + x_1 y 1 = x 0 − x 1 y_1 = x_0 - x_1 We can solve them for x 0 x_0 and x 1 x_1 to get: x 0 = ( y 0 + y 1 ) / 2 x_0=(y_0 + y_1)/2 x 1 = ( y 0 − y 1 ) / 2 x_1=(y_0 - y_1)/2 After that, we need to undo our initial step 1, which is the rotation by k k . Undoing a rotation is just rotating the same amount the other way, so that becomes a rotation by − k {-}k . Note Because a complex rotation value for a given angle looks like cos θ + i sin θ \cos\,\theta + i\,\sin\,\theta , the opposite rotation would be: cos ( − θ ) + i sin ( − θ ) \cos({-}\theta) + i\,\sin({-}\theta) By the negative angle trig identites , this becomes: cos θ − i sin θ \cos\,\theta - i\,\sin\,\theta So reversing the angle just means negating the imaginary component of the twiddle factor. For a moment, we’re actually going to ignore that 1 2 \frac{1}{2} scale on our result (just for now — we’ll get back to it), which ends up making the resulting 2-element inverse FFT steps look like: Add/subtract inputs 0 and 1 (the outputs from our forward FFT) to get two output values. Rotate the second output of the first step by − k {-}k . This ends up looking like: Diagram of a 2-length inverse FFT, showing the two inputs going into a single processing node, then back out to the two outputs. The second output node has a "-k" representing the fact that it is rotated by the opposite of the angle from the forward FFT. 0 1 0 1 -k Which looks just like the DIF from earlier, except with the angle negated ! This continues to work as we scale the FFT up to larger sizes. Here it is as a 16-element inverse FFT: A diagram of a 16-element inverted decimation-in-time FFT, which looks exactly like the earlier decimation-in-frequency diagram (with bit-reversed outputs), except all of the rotations are negated. 0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -0 -4 -0 -4 -0 -4 -0 -2 -4 -6 -0 -2 -4 -6 -0 -1 -2 -3 -4 -5 -6 -7 That’s right, by inverting the decimation in time FFT we end up with what looks like a decimation in frequency FFT with negated angles! A Grumpy Aside Honestly, I don’t actually like the “decimation-in-time/frequency” terminology, specifically because when using the same code for the inverse, it ends up being wrong: the DIT algorithm is decimating the inputs which are in time domain for a forward FFT, but they’re actually in frequency domain for an inverse FFT (since we’re going from frequency space back to time). I would have preferred “decimation-in-input” and “decimation-in-output” but I don’t think I’m going to win a fight that I’m 60 years late to. This relationship plays out the other way, as well: inverting the DIF gets a DIT -like FFT with negated angles: A diagram of a 16-element inverted decimation-in-frequency FFT, which looks exactly like the earlier decimation-in-time diagram (with bit-reversed inputs), except all of the rotations are negated. 0 8 4 12 2 10 6 14 1 9 5 13 3 11 7 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 -0 -0 -0 -0 -0 -0 -0 -0 -0 -4 -0 -4 -0 -4 -0 -4 -0 -2 -4 -6 -0 -2 -4 -6 -0 -1 -2 -3 -4 -5 -6 -7 This is great, because it means the same routine (whether DIT or DIF) can be used for forward and inverse complex FFTs! But, what about that 1 2 \frac{1}{2} scale that we ignored earlier? Every (radix-2) step in the IFFT has that 1 2 \frac{1}{2} scale on all of its outputs, so we can factor them all out of the inner steps and combine them into a single 1 N \frac{1}{N} scale per output for the whole process! Tiny Math! The scale becomes 1 N \frac{1}{N} because there are log N \log\,N passes, each with a 1 2 \frac{1}{2} scale, and ( 1 2 ) log N = 1 N (\frac{1}{2})^{\log\,N} = \frac{1}{N} . Thus, to use our (forward) FFT routine as an inverse FFT, there only need to be two changes: The twiddles need to have their sin \sin components negated (to rotate by the opposite angle ). Scale each resulting value by 1 N \frac{1}{N} (where N is the FFT length). This scale can be applied at the start or at the end, it doesn’t matter; it’s a constant scale to the whole result. You could even do it in the middle somewhere if you’re an absolute monster . Here’s some pseudocode for this, which uses the same overall algorithm to compute either the forward or inverse FFT: void CalculateFFT ( complex [ ] inputs , complex [ ] outputs , int len , bool inverse ) { if ( len == 1 ) { outputs [ 0 ] = inputs [ 0 ] return } BitReverseCopy ( inputs , outputs , len ) for ( int subLen = 2 ; subLen len ; subLen *= 2 ) { for ( int subStart = 0 ; subStart len ; subStart += subLen ) { var * data = & outputs [ subStart ] for ( int k = 0 ; k subLen / 2 ; k ++ ) { int kOdd = k + subLen / 2 complex evenSum = data [ k ] complex oddSum = data [ kOdd ] // Get the twiddle factor and invert the imaginary // component for an inverse FFT to negate the rotation. var tw = Twiddle ( k , subLen ) ; if ( inverse ) tw . imag = - tw . imag oddSum *= tw data [ k ] = evenSum + oddSum data [ kOdd ] = evenSum - oddSum } } } if ( inverse ) { // The inverse FFT needs to scale everything down // by the FFT length. float scale = 1 / len ; for ( int i = 0 ; i len ; i ++ ) { outputs [ i ] *= scale ; } } } We Made It! This brings us (finally!) to the end of the “standard” breakdown of various FFT techniques. In this post, we looked at: The decimation-in-frequency FFT, which is effectively a reversal of the flow of a decimation-in-time FFT. The inverse FFT, which can be calculated the same as a forward FFT with the angles negated and with a constant scale. In the next two posts, I’m going to go way off into the weeds and discuss the algorithmic variants that I used in FFT-20XX, starting with the algorithm for complex inputs .📝JoshJers' Ramblings
How we turned a C++ idea into a funded reality 💻 #coding #entrepreneur #event🎥C++ Alliance
Why do I get inconsistent results when I ask for the icon for the .. parent folder?It depends on what the parent folder is. The post Why do I get inconsistent results when I ask for the icon for the .. parent folder? appeared first on The Old New Thing .📝The Old New Thing
How to Properly Implement Code Quality Gates in your Development Process - Paul Jansen - ACCU 2026🎥ACCUConf
Why C++11 changed everything about your code #cpp #cplusplus #programming🎥CppCon
Interview with Kate Gregory about her Meeting C++ 2026 keynote brains and belonging🎥MeetingCpp
Stop Rebuilding the World: Faster C++ CI with vcpkg Binary Caching🎥Utah Cpp ProgrammersWednesday, November 18, 2026
C++ Programming with No AI, LSP, or Debugger: Ep24 -- Back to NDC Coordinates🎥Zed A. Shaw
Java4Shell: when base64 decoding leads to remote code execution?Let us start with an example that triggers the issue. byte[] src = ("A".repeat(128) + "=").getBytes(StandardCharsets.US_ASCII); Base64.getDecoder().decode(src); One hundred and twenty-eight letters A and one =. The string is not valid base64, and a correct decoder rejects it. OpenJDK writes past the end of the array anyway. The bug is CVE-2026-114938. It has been in … Continue reading Java4Shell: when base64 decoding leads to remote code execution?📝Daniel Lemire's blog
C++ Insights - Episode 80: A facet of C++s narrowing conversions🎥Andreas Fertig
std::recursive_timed_mutex in C++ | Recursive + Timed Locking #shorts🎥CppNuts
How to Host an ISO C++ Standards Meeting🎥C++ Alliance
If the Windows documentation doesn’t list a particular technology as supporting an operation, does that mean that it doesn’t support it?Windows documents what it knows, but it doesn't know what third party network protocols support. The post If the Windows documentation doesn’t list a particular technology as supporting an operation, does that mean that it doesn’t support it? appeared first on The Old New Thing .📝The Old New Thing
Math on MeshesIn my very first numpy blog back in 2014, I closed with a teaser: the gradient of a field on an unstructured grid, “a concept that does not exist in numpy”. A few blogs ago, I also said there was a lot more to say about vtkmodules.util.functions. Let’s say it.📝Kitware Inc
LidarView 5.3: now connected to ROS2In this blog, we will focus on this last point: what possibilities this brings to ROS2 users, but also for non ROS2 users, and go into the implementation details as well as the limitations of the approach.📝Kitware Inc
Back to Basics: Move Semantics - Ruslan Arutyunyan - CppCon 2026🎥CppCon
C++を1行も書かずに - RustとWeb GUIで商用オーディオプラグインを構築する - Sota Ichikawa & hotwatermorning (Kohsuke Yuasa)🎥audiodevcon
⬢ Distrobox: An In-depth Guide for Developers - Part 2Distrobox gives developers a fast, practical way to work across Linux distributions without the setup time and resource overhead of full virtual machines. This the second part of an in-depth guide. It is recommended to read the first part, if you haven't read it, yet.📝KDAB
C++ Insights Episode 80: A facet of C++s narrowing conversionsI published a new C++ insights episode: A facet of C++s narrowing conversions. In this episode, you'll learn about a fact of C++'s narrowing conversions and how I tripped and almost felt :-) Andreas📝AndreasFertig.comTuesday, November 17, 2026
C++ Optimizations in MSVC Build Tools 14.52C++ Optimizations in MSVC Build Tools 14.52 The Microsoft C++ team implemented new optimizations in MSVC Build Tools 14.52. Let’s walk through examples of some of these optimizations. We will focus on reassociation, loop optimizations, SIMD code generation, inlining, and patterns. Where noted, we’ll also include a few optimizations that appeared in MSVC 14.51 but […] The post C++ Optimizations in MSVC Build Tools 14.52 appeared first on C++ Team Blog .📝C++ Team Blog
Lightning Talk: Organic Evolution of Reflection in Apache Thrift - Shai Szulanski - C++Now 2026🎥CppNow
In the Microsoft employee price list, why did the BASIC compiler cost less than the BASIC interpreter?Understanding the pricing scheme. The post In the Microsoft employee price list, why did the BASIC compiler cost less than the BASIC interpreter? appeared first on The Old New Thing .📝The Old New Thing
How I built a simulation with C++23 and Unreal #tutorial #coding🎥CppCon
C++ Programming with No AI, LSP, or Debugger: Ep23 -- Rect and Meters🎥Zed A. Shaw
How can I ask a second program to show a dialog box as if it were shown by my first program?You have to explicitly coordinate the window management. The post How can I ask a second program to show a dialog box as if it were shown by my first program? appeared first on The Old New Thing .📝The Old New Thing