2,040 reputation
51228
bio website
location
age
visits member for 3 years
seen 19 hours ago

May
22
awarded  Popular Question
May
18
awarded  Yearling
Mar
11
asked What is the relationship between “flux” and pure functional reactive programming?
Feb
24
awarded  Popular Question
Feb
4
awarded  Popular Question
Dec
31
comment What is the correct way to publish a runtime? Should it be a singleton?
Same issue, sending a pointer to a struct or making it singleton... not sure what is better for C, now.
Dec
31
comment What is the correct way to publish a runtime? Should it be a singleton?
Hmm, fair enough. I guess that is a good approach. I might ask the question again in C, though, since there is a C backend and closures aren't available there.
Dec
31
comment What is the correct way to publish a runtime? Should it be a singleton?
Yes I guess that can be done.
Dec
31
comment What is the correct way to publish a runtime? Should it be a singleton?
If I get the idea correctly, as the "runtime" is hidden inside a closure, then the functions generated after the first one will not be able to access the same "runtime". That is, if I call "eval" on your code twice, it creates two runtimes.
Dec
31
comment What is the correct way to publish a runtime? Should it be a singleton?
It is a considerable slowdown when you have things such as "runtime.write(a,b)" inside a inner loop that runs a million times. JQuery accessors are never used in such inner loops, but for a compiled code, that would happen anytime you have a nested loop.
Dec
31
comment What is the correct way to publish a runtime? Should it be a singleton?
The problem is that functions can be compiled during the program execution. In this case it wouldn't work. I'm sorry, I didn't predict your answer!
Dec
31
asked What is the correct way to publish a runtime? Should it be a singleton?
Sep
16
awarded  Popular Question
Sep
2
comment Why aren't we building and using parallel processors *meant* for general computation?
Maybe not an average consumer, but I'm programming a computing server for a specific application and the benefit of having an actual parallel computer I could program into would be immeasurable.
Sep
2
asked Why aren't we building and using parallel processors *meant* for general computation?
Aug
5
comment Are bloom filters actually faster than hashes, even taking in account cache?
@delnan AFAIK it uses something around 10 bits/element, no? So, for several thousands of elements - ie, huge datastores - it will definitely not fit in a cache. So, if you are using k hashes, you are probably having k cache misses per read. Hash tables on the other hand guarantee that you will have your answer with 0 cache misses most of the time - collisions are rare, anyway.
Aug
5
asked Are bloom filters actually faster than hashes, even taking in account cache?
Jul
19
awarded  Popular Question
Jul
11
asked How can a true Vector be implemented in Haskell?
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.