Earlier quoted context omitted.
Compiler written in python, ruby and other "slow" .. languages going to take eternity to compile linux kernel. What makes you think everyone is out to write a C compiler?
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…
Writing a compiler in Python using Lex, Yacc and LLVM
31–40 of 44 posts
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#32Earlier 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…
Have you actually used Stalin? Compiling anything with it is shockingly slow. It does, of course, produce very fast programs—but it can take minutes to generate them, even in simple cases.
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#33Earlier 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…
Have you actually used Stalin? Compiling anything with it is shockingly slow. It does, of course, produce very fast programs—but it can take minutes to generate them, even in simple cases.
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#34Impractical: 1) The compiler is gonna be very slow; 2) If you make compiler for low-level language, such as C you need precise correspondence between data types used in cpu, datatypes used in compiler's implementation language and datatypes in the target language.
On the contrary. Compilers written in a high-level language are at a distinct advantage: they're easier to optimize (significantly so), easier to debug, and support forms that are difficult to deal with in a low(er)-level language like C or C++. I do compiler development every day, and I no longer touch low-level compilers. Everything I write is Boo (for my OS), Ruby (for my startup -- by far my favorite language for…
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#35Earlier quoted context omitted.
Have you actually used Stalin? Compiling anything with it is shockingly slow. It does, of course, produce very fast programs—but it can take minutes to generate them, even in simple cases.
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.
i.e. benchmarks or it didn't happen.
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#36Earlier quoted context omitted.
Have you actually used Stalin? Compiling anything with it is shockingly slow. It does, of course, produce very fast programs—but it can take minutes to generate them, even in simple cases.
No I did not, butI read papers, written by the author. Indeed it is slow, but still be good for final compilation. Alas it is r4rs, and also I heard that it sometimes generate incorrect code. Still Scheme is better choice in my opinion for performance sensitive code, than ruby/python.
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#37Earlier quoted context omitted.
Compiler written in python, ruby and other "slow" .. languages going to take eternity to compile linux kernel. What makes you think everyone is out to write a C compiler?
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…
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#38Re: Writing a compiler in Python using Lex, Yacc and LLVM
#39Earlier 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.
Re: Writing a compiler in Python using Lex, Yacc and LLVM
#40Impractical: 1) The compiler is gonna be very slow; 2) If you make compiler for low-level language, such as C you need precise correspondence between data types used in cpu, datatypes used in compiler's implementation language and datatypes in the target language.
On the contrary. Compilers written in a high-level language are at a distinct advantage: they're easier to optimize (significantly so), easier to debug, and support forms that are difficult to deal with in a low(er)-level language like C or C++. I do compiler development every day, and I no longer touch low-level compilers. Everything I write is Boo (for my OS), Ruby (for my startup -- by far my favorite language for…
I appreciate your choice, but I'd myself do differently.