Alexander Monakov (@_monoid) profile picture

https://teapaw.org/t.co/PtctIQ7HmN

Joined February 2011
Glad to see my code adding some spice to life of CHERI people!
2
2
Replying to @marc_b_reynolds
Oh wow, that's an amazing explosion. GCC's fixed optimization pipeline does not have a tail recursion elimination pass before inlining, so it first does some generous recursive inlining, before one of the calls is transformed to a loop.
2
Yeah, very necessary remark at the end there
2
Fun MIPS64 fact: if you bind a 32-bit integer variable to an output register operand of an inline asm, GCC assumes your asm sign-extends the register even if bound variable is unsigned:
1
Very short, just a loop and its hand-unrolled equivalent: github.com/kjn/lbzip2/blob/b…
It's also amazing how perfectly pshufb slots in in their inverse MTF transform (this eliminates almost half of mispredicted branches).
1
2
How could I not when you're being so humble, lbzip2 authors (what follows is actually fairly readable code).
2
1
7
And x86-info-term gives a nice console browser for (a subset of) uops.info data:
1
@johnregehr No need to be apologetic about reporting a fresh miscompilation, especially at -O2. It is extremely valuable, because the alternative is digging through 1000x the amount of code when some real-world package gets broken:
2
9
How performance of read() differs depending if file resides on tmpfs or hugetlbfs:
4
This trick needs an additional tweak to be useful: you get SIGBUS upon accessing the mapped range if reserved hugepages are not available (which is the default). To solve this, I mmap a second time over the returned range, with MAP_FIXED replacing MAP_HUGETLB|MAP_NORESERVE.
1
Is this Wirth's Law?
3