I don't know if compilers are able to detect this and compile it down to a single instruction, though.
Maybe a bit of a stretch, but I could see it fitting - https://en.wikipedia.org/wiki/Aptronym
I wish GCC and LLVM had compiler passes to semi/automagically "vectorize" hot sections using SIMD, i.e., magic transformation of UTF-8 conversion, regex matching, and string functions.
Side note: many years ago I wrote the backend for a private global surveillance system that has almost surely tracked the physical location of anyone reading this. We could efficiently track how often a device had been seen at a location in the prior 64 (days|weeks|months) in just 192 bytes and use popcount to compute the value. I am not proud that I built this.
Not that you couldn't do source level analysis as you suggest... it just wouldn't be effective in many cases.
It would also be 'unstable' in the sense that it might depend on architecture, etc.
bombcar•1d ago
adgjlsfhk1•1d ago
pklausler•1d ago
kens•1d ago
[1] https://retrocomputing.stackexchange.com/a/8666/4158
[2] https://archive.computerhistory.org/resources/access/text/20...