3 ms·
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
by pc 17y ago
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.
- ilkhd2 17y agoNo 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.
- mahmud 17y agoStalin and Mlton are whole-program optimizing compilers. They take a bit longer than other compilers, but the results are impressive.
- ilkhd2 17y agoYou 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.
- mahmud 17y agoWe 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.
- ilkhd2 17y agoMan, you are being difficult. Ruby is well known to be a very slow language (if you want numbers check http://shootout.alioth.debian.org/u32q/benchmark.php?test=all&lang=yarv&lang2=gpp&box=1 http://shootout.alioth.debian.org/u32q/benchmark.php?test=al...). Optimizing compilers are computationally demanding tasks, and the proof (albeit extreme one) is Stalin Scheme compiler, that can take minutes to compile code, but the result is sometimes faster than C/C++ code, or at least on par. Now, this compiler is written either in Scheme itself or in C i do not remember, but definetelt not in ruby. If it take to compile your code a minute for a compiler written in [C/Stalin Scheme] it will take at least ten minutes for one written in ruby.
- ilkhd2 17y agoAnd 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.
- mahmud 17y agoSorry, I must have misunderstood your intent then. Python and Ruby are probably fast enough for compiler construction as well; I am sure they could be tweaked by an expert to yield acceptable performance, but I am just not such expert :-)