Kenneth Steimel is a user on scholar.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

Something to think about: when compiling to machine code the first trickiest optimization compilers need to do is to store as much data as it can within CPU registers.

And in doing so they need to make sure each variable isn't in the same register as any used to compute it.

Throw in the inherently finite number of registers and this becomes the Map Colouring Problem! NP-hard.

It would take forever to compute optimal solutions to this, but they don't need to do a perfect job.

@alcinnz cache consistency for openmp programs is similar to what you're talking about correct?

@ksteimel I haven't looked too deeply into OpenMP, but I'd imagine so.

I'm talking about register allocators.

Kenneth Steimel @ksteimel

@alcinnz
Okay cool. I'll have to read up on that some.