4 ms·
> Compilers involve giant tree structures, with lots of allocations, pointer chasing, and data-dependent multi-way branches. Tree structures and data-dependent
by Olreich 3y ago
> Compilers involve giant tree structures, with lots of allocations, pointer chasing, and data-dependent multi-way branches.
Tree structures and data-dependent multi-way branches do seem inevitable to me, but pointer chasing and allocations don't seem inevitable at all. There are lots of ways to avoid allocations or make allocations practically free. Similarly there are lots of ways to make pointer chasing less prevalent, especially getting down to single-indirection.
rustc may not be able to fix their allocation or pointer chasing problems, but this is not endemic to the problem of compiling.
- di4na 3y agoNo but it is endemic to how we think about compilers up to now, and especially when the rust compiler arch was massively developed, more than 10 years ago. I recommend a watch of this for a recent take on trying to change how we think of these. It is an open research field https://m.youtube.com/watch?v=ZI198eFghJk https://m.youtube.com/watch?v=ZI198eFghJk