IOW, the tutorials are too basic. They don't analyze the trade offs a compiler writer has to make. The "heavy duty" compiler construction books drown the reader in theory about grammars, parser generators, NFAs to DFAs and other things I don't even care to remember. After reading all that stuff, even if the reader understood it all, he/she is nowhere near writing a decent compiler.
...
un-optimized optimized
FPC: 121 s 109 s
Mingw-gcc: 76 s 27 s
But a high-performance compiler can be built up incrementally: GCC didn't spring full-formed from Stallman's brow, and as everybody knows he started off by trying to use Pastel ("an off-color Pascal") as its foundation.
I'd suggest that it boils down to questions of adequacy and review.
Is the underlying syntactic definition adequate to avoid ambiguities?
Is the language definition adequate to meet its goals (e.g. concurrency support in Ada)?
Does the syntax need to be reviewed in order to support something that has to be in the language?
Is a particular type of parser adequate to parse the syntactic description of the language?
Does the language need to be reviewed because of problems implicit to all types of parser?
Is a particular set of intermediate data structures adequate to represent the parsed language such that target-agnostic optimisations can be applied?
Does the parser need to be reviewed because of symbol table or parse tree problems (e.g. available storage)?
Is a particular final representation adequate to allow target-specific optimisations to be applied?
Does the parse tree or symbol table need to be reviewed because of code generation requirements?
At all points, the key is not painting oneself into a corner such that subsequent steps are more convoluted than they have to be. As a specific example, Pastel supported what appears to be an early implementation of generics, but since the scope wasn't limited the parse tree for the entire program had to be kept in memory- and in those days memory was scarce and expensive.
Perhaps more relevant to the current discussion- and to the state of FPC- is that the syntax tree, as the compiler's central element, should be sufficiently well-understood that any researcher can work out how to extend it to store additional context revealed by the parser and then use that context to contribute to experimental code generation.
MarkMLl