Caterpillar

Daily Thought - 2024-07-31

< back to list

So, code could get auto-parallelized in the pre-compilation step. I'm not sure if that's a good idea, but it certainly is a fascinating one. Anyway, if it were to happen, some open questions would need to be addressed. For example, to make a good decision on what to parallelize, the compiler needs knowledge of the specific hardware to target. Which won't be available in pre-compilation.

Maybe a project can define a number of profiles to represent different platforms it supports, and the developer switches between them to view the different ways their code could end up being parallelized. But that might be confusing and maybe not that useful. But having the option to see how it looks on a specific target (maybe to look into a specific bug) would certainly be useful.

Or maybe the compiler just splits the code into parallelizable packets, which then get scheduled at runtime. That would be more flexible, but also carry some overhead. And we'd be back to the developer not understanding the runtime behavior of their application. Definitely lots of details to figure out before this can happen, if it ever does.

<< previous thoughtnext thought >>