It is a little unfair, however, to compare the speed of a compiler which emits C code to a tool chain which creates linked optimized executables. For a fairer comparison, note that Raspbian already comes with a really fast C compiler that emits C code for its output. It is called cat.
You seriously underestimate what is in the Ion compiler at this time:
1) It does lexical analysis and tokenization of Ion source text, just like a real compiler.
2) It does syntax parsing into an abstract syntax tree structure, just like a real compiler.
3) It does symbol resolution, type checking, type conversion etc, just like a real compiler.
4) It builds the final program out of multiple input modules, just like a real compiler.
Heck, it is a real compiler!
As to your points:
a) Code generation: Yes of course we would like to compare GCC/Clang to Ion producing real executable code. Per will be adding a generator for RISC V binaries when he is good and ready. He did an x64 generating compiler a couple of years ago that compiled blindingly fast. https://www.youtube.com/watch?v=N9B2KeA ... 7&index=12
Is suspect that the Ion RISC V generator will be similarly hundreds of times faster than GCC or Clang.
b) Optimization: I suspect that Per's finished compiler will generate code that is as efficient as GCC with optimization off (-O0). That is pretty good in my book. i would not be surprised if he does better.
c) Linked executables: Well, has it ever occurred to anyone that separately compiling source files into binary object modules and then linking those modules into an executable is not required and a complete waste of time and effort?
In the modern world where even the smallest machines have a gig of RAM why not just compile all the sources together in one go? Boom, lightning fast, job done.
That is what Ion does with it's package system. No more wasting time and effort with all those include files and other junk.
I think this is a very good choice for a compiler designed as a pedagogical tool whilst at the same time being fit for real uses, not just a toy compiler as students often build in CS classes.
Still, Ion won't beat the speed of cat
I do take you point about videos and the good old documentation of yore. However, in this case there are already many books on compiler construction. For example the famous "Dragon" book: Compilers: Principles, Techniques, and Tools: https://www.amazon.com/Compilers-Princi ... 0321486811
. I have stuck my head in such books over the years. Mostly I did not make any sense out of them.
In fact Per recomends we read Niklaus Wirth's books on the Oberon language and system https://www.inf.ethz.ch/personal/wirth/ ... Report.pdf
. A lot of what Per does in his videos is inspired by Wirth.
There is something about watching a master of his craft creating something in front of you in real time whilst he talks about the problems and the possible solutions. A lot of little insights and glimpses into the thought processes to be gained there that you will never get from a book that just dumps out a ready made solution.
It's not for everyone but I find it fascinating.
Memory in C++ is a leaky abstraction .