Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-23 Thread Bob Zhang
We do bounds check, but we also provide unsafe version which does not do bound check for performance reasons. If you find the safe function which does not, you are welcome to file an issue On Mon, Jan 23, 2017 at 8:41 PM GordonBGood wrote: > On Tuesday, 24 January 2017

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-23 Thread Bob Zhang
Sorry, typo... I mean data representation is not the only reason that BuckleScript runs fast On Mon, Jan 23, 2017 at 9:41 PM Bob Zhang <bobzhang1...@gmail.com> wrote: > I agree, we did a lot of work to engineer performance, data representation > is part of the reason that BuckleSc

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-23 Thread Bob Zhang
I agree, we did a lot of work to engineer performance, data representation is part of the reason that BuckleScript running fast, it's definitely the only one On Mon, Jan 23, 2017 at 9:37 PM Richard Feldman wrote: > The reason is that BuckleScript proves that Arrays

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-24 Thread Bob Zhang
a language, as long as you enjoy it, then it's great. Have fun with your favorite language! On Tue, Jan 24, 2017 at 11:53 PM Bob Zhang <bobzhang1...@gmail.com> wrote: I have been working on compilers professionally for more than 8 years, I did not read your ocaml code, so I am not sur

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-24 Thread Bob Zhang
I have been working on compilers professionally for more than 8 years, I did not read your ocaml code, so I am not sure it's performant ocaml code. But anyway, I think you already convinced yourself elm suits your need better :-) On Tue, Jan 24, 2017 at 11:44 PM GordonBGood

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-26 Thread Bob Zhang
till, there is a very small difference between uglify and google > closure with advanced_opts. If Elm had been compiled into modules, then > uglify would have done much worse. > > > torsdag 26. januar 2017 02.37.59 UTC+1 skrev Bob Zhang følgende: > > Not really, closure has very ve

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-26 Thread Bob Zhang
hon against JS, Python users *rewrite the hot function *in C and call it from Python due to the incapability of Python. On Thu, Jan 26, 2017 at 4:31 AM, GordonBGood <gordonbg...@gmail.com> wrote: > On Wednesday, 25 January 2017 19:25:40 UTC+7, Bob Zhang wrote: >> >> I cannot help

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-25 Thread Bob Zhang
I am not interested in campaign, it's not fun. But I cannot help replying when I see some inexact arguments... elm is a reasonably fast language, I think it might run even faster than purescript, enjoy your work! On Wed, Jan 25, 2017 at 4:55 AM Robin Heggelund Hansen wrote:

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-26 Thread Bob Zhang
As I said, you already get convinced elm is better for you, then happy coding in elm. I am not interested in a biased judgement. On Thu, Jan 26, 2017 at 7:29 PM GordonBGood <gordonbg...@gmail.com> wrote: > On Thursday, 26 January 2017 21:13:33 UTC+7, Bob Zhang wrote: > > Hi Gor

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-24 Thread Bob Zhang
Thanks for your update. To be fair, BuckleScript is a one year project, I will keep focused on improving performance and build speed, I assure that you can expect even more amazing perf. Btw, we have some of the best front end developers to actively working on UI frameworks using BuckleScript

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-24 Thread Bob Zhang
my use, as a Elm back end not a problem as > Elm doesn't use arrays directly, but it isn't strictly type safe. > > > On Tuesday, 24 January 2017 09:16:11 UTC+7, Bob Zhang wrote: > > We do bounds check, but we also provide unsafe version which does not do > bound check for per

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-15 Thread Bob Zhang
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 ) It takes around 0.58s to do a clean build: 55

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-16 Thread Bob Zhang
This will be a fundamental change to the architecture of the elm compiler, it is cool to see elm is also moving in this direction in the next several months! On Mon, Jan 16, 2017 at 1:09 AM GordonBGood wrote: > Richard and Hongbo, I'm relieved to know that others are aware

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-14 Thread Bob Zhang
I would be very surprised if parsing is the bottle neck. In most cases, type checking and register allocations (could be quadratic) takes much more time. OCaml's type checking algorithms is very clever, almost linear in most practical use cases. On Sat, Jan 14, 2017 at 11:14 PM Richard Feldman <

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-12 Thread Bob Zhang
We do have around 12 passes to optimize js code, will have more advanced optimizations coming in 1.5 Note the optimization is written carefully so it will not slow down compile time. To squeeze the compiler performance, some performant critical code was changed to c in recent release On Thu, Jan

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-04 Thread Bob Zhang
Hi Gordon, As you can see, BuckleScript already did a very good good job here, of course, there are still places for improvement. To write extremely high performance code, you should avoid creating a closure in a tight loop, here you can lift the `nxtc` into the toplevel, in the future, we will

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-05 Thread Bob Zhang
can still write low level code with type safe guarantee in it when performance matters On Thu, Jan 5, 2017 at 12:32 AM, GordonBGood <gordonbg...@gmail.com> wrote: > On Wednesday, 4 January 2017 21:05:58 UTC+7, Bob Zhang wrote: >> >> Hi Gordon, >> As you can see, Buck

[elm-discuss] Re: Same code generated by BuckleScriptRe: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2016-12-31 Thread Bob Zhang
(on par with Haskell) On Saturday, December 31, 2016 at 8:35:28 AM UTC-5, GordonBGood wrote: > > On Saturday, 31 December 2016 11:44:10 UTC+7, Bob Zhang wrote: >> >> >> Just for fun, I pasted the same code under BuckleScript playground: >> >> >> https://bloo

[elm-discuss] Same code generated by BuckleScriptRe: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2016-12-30 Thread Bob Zhang
Just for fun, I pasted the same code under BuckleScript playground: https://bloomberg.github.io/bucklescript/js-demo/?gist=efaf57aef9b37a38785681ded0ba35a9 The generated code is below ```js function testProg(n) { var lmt = Pervasives.min(n + 1 | 0, 10); var _i = n;

Re: [elm-discuss] Re: Elm "faster than JavaScript" (version 0.18) - NOT - Parts I and II...

2017-01-15 Thread Bob Zhang
, Jan 15, 2017 at 9:23 PM GordonBGood <gordonbg...@gmail.com> wrote: > On Monday, 16 January 2017 02:54:17 UTC+7, Bob Zhang wrote: > > Hi Gordon, > > It is not uncommon to see 100 times slowness when building Elm vs OCaml in > incremental build (dev time), the reason is that