Hi Gordon, 
In case you are interested, this is a link I made to show the excellent compile 
time performance of BuckleScript 
(https://twitter.com/bobzhang1988/status/810508070350680066 
<https://twitter.com/bobzhang1988/status/810508070350680066>) 
It takes around 0.58s to do a clean build: 55 modules on Mac Book Pro 13 model 
(cold start, no caching). 
It is not uncommon to see 100 times slowness when building Elm vs OCaml in 
incremental build (dev time), the reason is that Elm (correct me if I am wrong) 
always need a link time, so whenever your change a file, it will trigger the 
linker, this will get significantly worse if your project is in not small. 
While BuckleScript compiles one OCaml module to one ES6 module, it does not 
need link during dev time, best for incremental build.

> On Jan 15, 2017, at 1:07 AM, GordonBGood <gordonbg...@gmail.com> wrote:
> 
> 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 a topic in the Google 
> Groups "Elm Discuss" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/elm-discuss/Um7WIBTq9xU/unsubscribe 
> <https://groups.google.com/d/topic/elm-discuss/Um7WIBTq9xU/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> elm-discuss+unsubscr...@googlegroups.com 
> <mailto:elm-discuss+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to