1,897 reputation
51123
bio website
location
age
visits member for 2 years, 1 month
seen yesterday

Jun
21
comment Would you get better performances by coding an application in C, then compile to JavaScript?
And as much as your statement about optimisations is interesting, it is simply not true in all cases. Certain optimisations will mostly likely always generate faster code. For example, optimising for (var i=0;i<1000;++i) x+=1 to x += 1000 will pretty much always be faster in any kind of target, because you just decreased the number of operations. Or, more obviously, map f . map g will mostly always be slower than map (f . g), for the same reason. In other words, albeit not guaranteed, it is often likely that a program with fewer reductions will have better performance.
Jun
21
comment Would you get better performances by coding an application in C, then compile to JavaScript?
The latter. It performs optimisations that are not possible in JavaScript. For example, a specific function as coded in C could be optimised taking account its type, which is not possible in JavaScript. So in order to get the same kind of optimisation in JS, you couldn't rely on the compiler nor using built-in JS functions. You could, in theory, yes, but then you'd not have something very far from linguistic JS.
Jun
21
comment Would you get better performances by coding an application in C, then compile to JavaScript?
If you think about it, Emscripten makes use of decades of research in optimising C, including a wide range of optimisations that are not even possible in JavaScript - V8 or not. That kinda makes my hypothesis more believable.
Jun
21
comment Would you get better performances by coding an application in C, then compile to JavaScript?
I agree with you, but it could be the case that while someone very good at optimising JavaScript could do a better job than emscripten, he must not just be good, but really good. Probably inhumanly good, because in order to get that kind of performance out of it, you'll be probably writing some ridiculously obfuscated asm.js, going through reinventing pointers and allocators, up to a point it isn't really JavaScript anymore. But if you mean you can get such performance by using usual JS, including its builtin arrays, objects, functions etc, I fear that is really unlikely....
Jun
20
comment Would you get better performances by coding an application in C, then compile to JavaScript?
I guess so, but it also takes care of the memory management, so I am not sure that is considered an interpreter by the terminology.
Jun
20
asked Would you get better performances by coding an application in C, then compile to JavaScript?
Jun
8
asked How can you predict the time it will take for two processes in two different machines in a cluster to communicate?
May
30
comment If Scheme is untyped, how can it have numbers and lists?
@delnan ah I get it. You can return different types from if. And have lists of mixed types. Makes sense now.
May
29
comment If Scheme is untyped, how can it have numbers and lists?
Yes, but from a type theorist perspective, you could just say nil : List and cons : a -> List and it is now perfectly statically typed. That is what I don't get: it seems like you could infer the type of any term like that, so why not just say Scheme is statically typed?
May
29
comment If Scheme is untyped, how can it have numbers and lists?
My question was actually edited by someone, I do think it was more clear before. This answer solved a lot of my questions, but I would love to see your answer too, @JimmyHoffa.
May
29
comment If Scheme is untyped, how can it have numbers and lists?
Sure, but do you understand the question? I am asking what is the underlying type system used on Racket - and, if it actually has types, why it is called untyped.
May
29
asked If Scheme is untyped, how can it have numbers and lists?
May
29
comment Which hashing algorithm is best for uniqueness and speed?
Is the poster aware this is not just an awesome answer - this is the world's de facto reference resource on the subject? Anytime I need to deal with hashes, that solves my issue so fast and authoritatively that I don't ever need anything else.
May
18
awarded  Yearling
Apr
22
awarded  Notable Question
Apr
14
awarded  Popular Question
Jan
31
awarded  Popular Question
Dec
27
accepted Is there any practical algorithm / data-structure that can't be done with non-recursive Lambda Calculus augmented with foldl?
Dec
27
comment Is there any practical algorithm / data-structure that can't be done with non-recursive Lambda Calculus augmented with foldl?
Alright, points for you. On the meantime, Tromps suggested this even simpler proof my premise was false: Y' = (λx. λy. x y x) (λy. λx. y (x y x))
Dec
27
comment Is there any practical algorithm / data-structure that can't be done with non-recursive Lambda Calculus augmented with foldl?
@jozefg it depends on unfold which is not possible on this language as you can't generate lists other than using range. Your argument is invalid.