Internals of GCC
During the interview many ideas crossed my head, for example, I always thought that GCC meant “Gnome C Compiler” instead of “GNU Compiler Collection”. However it was kinda interesting to listen to what one of the collaborators of such a successful and well known compiler has to say about the implementation of a functioning compiler.
As I agree with a lot of the stuff that he mentioned, optimization, removing dead code, bettering the use of memory. But what surprised me the most was that he mentioned that a bunch of different compilers were combined in the same place, because most of them have a bunch of similarities, and not just in the way this were implemented.
He mentioned that the use of context free grammar and compilation trees makes the process of joining a bunch of different languages and contexts to a common point were there can all be implemented, compiled, optimized and deploy. To me that has a very big impact because what that is telling me is that having a very good compiler of a particular language, is the corner stone to make your very own collection of compilers, as having, lets say a C compiler to Assembly, then having just enough components of a Python compiler so that you can merge the half made Python compiler, with the fully developed C compiler so it can take the lead and continue the compiling process.
I also like the part about optimization and all the different techniques, steps and data structures used to make the process easier, faster and better.
The impression that it left me was that it is very complex to develop an optimal functioning compiler, and that the steps taken to get to the compiler can be taken in a slightly different order in order to make the compiling process easier and faster, to the person building it.
Comentarios
Publicar un comentario