Live data from Hacker News

The fastest Statistical Programming Language is …Javascript?

r-bloggers.com

21–30 of 41 posts

Re: The fastest Statistical Programming Language is …Javascript?

#22
post #21

What about straight C??? There are many great stats libraries in C (e.g. Apophenia). C is not a hipster language but maybe (like polaroid filters in Instagram) it's time for it to make a "retro" comeback. C kicks ass for speed. Obviously.

PS http://apophenia.sourceforge.net/

Re: The fastest Statistical Programming Language is …Javascript?

#23
post #13

Earlier quoted context omitted.

> no-one (sane) is going to rewrite all of those linear algebra libraries Is it because it would take a long time or because it's inherently hard?

It's easy enough to do a basic implementation, but getting good numerical stability and good performance is hard (and in Javascript, it's pretty much impossible with current implementations). See also the matrix multiplication benchmarks in the post: JS is 60x slower than Matlab, even though it's already using typed arrays. A naive triply nested for loop in C would probably perform similarly to the JS, which is to sa…

Yes, latest versions of Matlab use multithreading.

Re: The fastest Statistical Programming Language is …Javascript?

#24
Eh... I'm getting tired of this "x is faster than y" business. JavaScript might be fast in these examples, but that doesn't mean it's faster at everything. Comparing programming languages is fruitless. X might be faster than Y at Z, but that does not mean X is better suited than Y for all applications.

JavaScript is faster than MatLAB etc in these examples, but as mentioned already it's slower at matrix multiplication and I'm sure that's just one example.

Does JavaScript have tonnes of libs? Does it have type-checking? Does it have all those other things that I would be desperate for if I was performing important calculations? Can I distribute the computing easily? Etc, etc.

Let's stop comparing programming languages as if they're one tool to do one job. Different programming languages have different applications and are suited for different jobs.

Re: The fastest Statistical Programming Language is …Javascript?

#26

Urrgh. This came through on my feed earlier today, and I left a comment on it. While javascript is fast (and can be used for many things), the real issue with using it for stats is the lack of libraries. More specifically, as far as I know it cannot interface with Fortran. That's a death knell for any statistical programming language, as it means no LAPACK, and no-one (sane) is going to rewrite all of those linear al…

One relatively speedy route to getting solid numerics scriptability in JS is to do the heavy lifting in NaCl. An NaCl plugin for node would then let you use the same binaries on both the server and client.

Re: The fastest Statistical Programming Language is …Javascript?

#27
post #20

Who the hell would use the relatively library less javascript to do analysis? Sorry, R, Matlab, Python, Syntax, Fortran have actual libraries for this stuff, JS, no.

Yeah, I find it kind of funny when people compare a general purpose programming language with a statistical software. In R you have libraries for things like Apprximate Bayesian Computation, parametric and non-parametric statistics, and even neural networks.

Sure, you could achieve the same with a general purpose PL, but you would have to implement everything from scratch.

Re: The fastest Statistical Programming Language is …Javascript?

#28
post #20

Who the hell would use the relatively library less javascript to do analysis? Sorry, R, Matlab, Python, Syntax, Fortran have actual libraries for this stuff, JS, no.

JS does have a few (like jStat) but they're fairly young. Still, I don't think the article was suggesting that everybody should drop everything and jump on JS for statistics work. But it does raise the question of whether more focus should be put into the development of statistical libraries for JS.

Re: The fastest Statistical Programming Language is …Javascript?

#29

His table shows js is 40x slower on matrix multiplication.

Ergo, JavaScript isn't the fasted language for that matters, because matrix multiplication is too important.

It's not just that. It's that there's no concept of a vector or matrix at all, and no operator overloading to allow these concepts to be introduced into the language in an idiomatic way. You could put these things into a bastardized JavaScript JIT, but that seems at least as awkward as Julia.

Re: The fastest Statistical Programming Language is …Javascript?

#30
post #14

Urrgh. This came through on my feed earlier today, and I left a comment on it. While javascript is fast (and can be used for many things), the real issue with using it for stats is the lack of libraries. More specifically, as far as I know it cannot interface with Fortran. That's a death knell for any statistical programming language, as it means no LAPACK, and no-one (sane) is going to rewrite all of those linear al…

I don't know much about javascript implementations. Is there no foreign-function interface available ? If you can interface with C you can interface with Fortran (with a little extra work).

There is no foreign-function interface, but you could use Emscripten to compile C libraries for it.
Post reply on HN