On Wednesday, 25 January 2017 19:25:40 UTC+7, Bob Zhang wrote:
>
> elm is a reasonably fast language, I think it might run even faster than 
> purescript, enjoy your work!


Yes, Elm is reasonably fast for some programs such as the functional primes 
generator but is inconsistent and not very fast for others; whereas 
BuckleScript is pretty fast for everything and when it isn't, it is fairly 
easy to understand why.

For now, I'd like to try to understand what makes Elm slow in some 
situations and see if there is anything I can do to make it reasonably 
consistently fast in all situations.

For one thing, it looks like Elm's implementation of Lazy in elm-lang/lazy 
is very slow (it resembles Fable's) and thus currently the use of 
LazyList's is very slow.  BuckleScript's lazy is very different under the 
covers and is of expected (fast) speed of about five times faster than Elm. 
 Now this is true for Chrome, but now Edge is the browser running Elm Code 
at about BuckleScript speed.

I need to better understand what makes some types of JS code (in this case 
deferred execution using CIS's or memoized Lazy's) run well optimized on 
some browsers but not on others.

Most people probably don't use Lazy or LazyList in Elm as they are fairly 
new additions to the elm-lang libraries so this isn't likely commonly 
experienced, but using them can produce some very elegant implementations 
for some types of problems.

-- 
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.

Reply via email to