Consider that we have an array of 8-bit unsigned integers and we want to calculate their sum modulo 256. In C++ we can do it like this: 1 2 3 4 uint8_tsum(constuint8_t*data,size_tlen){returnstd::accumulate(data,data+len,uint8_t(0));} When compiling with Clang 19.1.0 and flags -O3 -march=rocketlake -fno-unroll-loops, we get the following assembly: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 5...| nicula.xyz blog
Short (meta) blog post about what kind of educational materials I prefer, and why: I generally prefer learning material that is impersonal, and doesn’t contain author-specific idiosyncrasies. When I’m reading or watching something, I’m not interested in hearing the author give a ‘performance’, I’m typically interested strictly in the key information being conveyed. As such, I don’t like seeing jokes, quirky formulations or other similar things through which the author seemingly ...| nicula.xyz blog
After my previous post, Eliminating redundant bound checks| nicula.xyz
A couple of days ago I was thinking about what you can do when the branch predictor is effectively| nicula.xyz
Problem| nicula.xyz
The problem| nicula.xyz