upvote
Different CPU models have different optimal instruction scheduling. So you'd hillclimb a certain CPU model and perform suboptimally on another.

It's very easy to just let C-compiler do that work and compile the lib statically + LTO (optionally PGO). You'll get all of the benefits you think you're getting from the assembler version. LTO & PGO might even find more optimizations around the compression / decompression calls.

reply
right, I'm just saying that for my use case, I'd prefer to just run a specialized tune against each CPU model I use

I think that over time an increasingly large portion of software will be built this way. For this project I'm ok with adding support for each new CPU taking an agent a few hours. If you're implementing against a known standard, until you find a security issue, these don't really ever need to change, which is a very nice property IMO

reply