On Sunday, 15 January 2017 11:14:55 UTC+7, Richard Feldman wrote: > > I'm wondering why the Elm compiler is so slow at parsing if that is where >>>> the slow-down is >>>> >>> >>> Evan recently rewrote the parser to be much faster. >>> >>> You can try a preview binary >>> <https://groups.google.com/forum/#!searchin/elm-dev/parser%7Csort:relevance/elm-dev/c_BDwK5UXFs/zP9aRkMeEQAJ> >>> >>> of the new version if you're curious. :) >>> >> >> I saw that over on elm-dev, but haven't tried it because compilation >> speed isn't a problem for the Elm code I have written so far. The only >> reason I brought it up is OvermindDL1's comment >> <https://groups.google.com/d/msg/elm-discuss/Um7WIBTq9xU/JpNNGv1JAgAJ> that >> compiling a Ocaml/BucketScript code (that presumably did the same thing as >> the Elm code) took about 0.1 seconds as compared to 40 seconds with the Elm >> compiler - a 400 times speed-up! We weren't given details of the code or >> test conditions and whether one was an incremental compilation, but that >> sounds quite serious and would affect the usability of Elm. If that data >> is verifiable, a speed up of double or even quadruple doesn't begin to >> touch the difference and should be investigated. >> > > If only there were a binary posted somewhere, based on a compiler that had > just been rewritten to improve build times, so that someone could post a > benchmark instead of speculation! ;) >
Yes to that. If someone has a concrete example of code that takes much longer to compile that the same implemented in another equivalent language such as BucketScript, I would like to see it. I expect BuckleScript to compile some faster due to its OCaml origins being finely tuned for compilatoin speed, but i wouldn't expect it to be more than four or five time faster, and as you say, Evan has done something that makes this quite a bit faster. Theoretically, Elm should be able to compile fast due to the simplicity of the language syntax. Meanwhile, I think I'll just take a look at seeing how hard it would be to improve the code generation, since that doesn't really impact anything else. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
