Earlier quoted context omitted.
You probably missed the point - my concern is not the speed of compilation _of_ _the_ _compiler_ _itself_ - it is totally irrelevant, what is important is the performance of _created_ _compiler_, which is going to be ok, taking into account the quality of Stalins optimizer.
We can debate the performance of a hypothetical compiler for eternity, or we can cite examples; slow compilers written in a non-C language along with publicly available input data. i.e. benchmarks or it didn't happen.
Writing a compiler in Python using Lex, Yacc and LLVM
41–44 of 44 posts
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#42Earlier quoted context omitted.
What make you think that I think this way? Linux kernel is just an example of relatively big program, where performance of the compiler is an important issue. Another example of performance-sensitive application of compilers is background Java compiler in Eclipse - even for rather small programs it has to be fast. Ruby is 10-100 (actually more than that) times slower than C/Java, So if you optimizer (wriiten in C/Jav…
Background compilers do not need to perform heavy optimiztion, so can skip a lot of time consuming steps.
And do not forget by the way that Ruby is a memory hog.
http://shootout.alioth.debian.org/u32q/benchmark.php?test=al...
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#43Earlier quoted context omitted.
Did you read the post? The guy was writing this for an academic project where speed didn't matter and secondly he was using LLVM for code generation. low level details don't really come into play in compiler construction until the code generation step most of the work up to that point is text parsing, syntax checking, and AST creation. In other words tasks suited perfectly to a language like Python.
> low level details don't really come into play in compiler construction until the code generation -- Not true. modern compilers do a lot of optimization long before code generation, and you really want to have for example floating point to be behaving exactly like in target language - if you collapse operations on constants such as 1.0D + 4.0. And aside from optimization, lexer - it has to distinguish single-precisi…
You keep writing that like it's a hard thing to do. It isn't. More to the point, it's a small part of the whole problem.
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#44Earlier quoted context omitted.
We can debate the performance of a hypothetical compiler for eternity, or we can cite examples; slow compilers written in a non-C language along with publicly available input data. i.e. benchmarks or it didn't happen.
And I do not know where you saw me saying C is the ultimate language for making compilers. I never said that, I do not think so, I just said python/ruby are bad for the task.