3 ms·
But a lot can still be learned by a hobbyist by doing so.
by throwaway55554 7y ago
But a lot can still be learned by a hobbyist by doing so.
- chrisseaton 7y agoHmmm... I'm not as sure. I wonder if we could do people a service by showing them how it's done today from the start, rather than showing them yesterday's stuffy, ponderous, inelegant approach (sorry for the opinion) and then having to roll that back when they start working on something in practice.
- spekcular 7y agoHow would you show a novice how it's done today? I've always wanted to learn about compilers, but something tells me the dragon book is no longer the go-to source.
- chrisseaton 7y agoIt's actually a real problem - the knowledge of how for example JavaScript VMs and JITs work isn't really written down very well. It's all in people's heads and you learn as an apprentice (PhD student). I don't have a better solution than to show you in person.
- jcranmer 7y agoOne of the issues, I think, is that compilers has really become a topic that is way too broad to fit into one book. You'd need at least: * Foundations: the frontend, codegen [to IR] (including vtables, lambdas, and coroutines, probably), the big scalar optimizations, register allocation, maybe instruction scheduling? * Loop optimizations: dependence analysis, all the loop opts, autovectorization, autoparallelization. Maybe cover some OpenMP or heterogeneous computing (e.g., SYCL, CUDA) here * "Fancy" optimizations: profiling (including what & how to profile), link-time (including thin-lto techniques), SLP vectorization, possibly superoptimization and dataflow analysis * Dynamic language VMs: JITs, garbage collection, shape optimization, and several of the various tricks (e.g., NaN-boxing, deoptimization guards) * You might be able to make an entire book out of fuzzing and symbolic/concolic execution, but I think it'd be thinner than the other ones here. And there are still things I don't know where to put. Alias analysis, exception handling, debugging…