Live data from Hacker News

FastR: An implementation of the R language in Java [pdf]

oracle.com

31–34 of 34 posts

Re: FastR: An implementation of the R language in Java [pdf]

#31

The Relite mention at the end looks very worthwhile. We were just about to begin a large rewrite of analysis code from R to CUDA; Relite has the potential to save the effort of rewriting our existing code.

Relite author here. I'd love to learn more about your use cases, feel free to get in touch!

Re: FastR: An implementation of the R language in Java [pdf]

#32
post #22
post #16

Given the problems with Java's floating-point implementation [1], would this be reliable for statistical analysis? [1] https://news.ycombinator.com/item?id=6585828

1. It is more a philosophical disagreement than a problem, and whatever the semantics you want, the JVM does not limit you. The disagreement revolves around the Java compiler and language semantics, not the JVM. 2. The math in FastR, if I understand the presentation correctly, is performed by FORTRAN libraries anyway. Using battle tested FORTRAN libraries for matrix computations is common practice in C, Java, Julia,…

I do think that Kahan's objections to Java's floating-point support were more than just philosophical, although it's unclear to me at this point how many of them still apply. The biggest issue that seems to still remain is that you can't change rounding modes or check flags, both of which are essential for verifying numerical stability and correctness. Far worse than any floating-point issues on the JVM is that your indices and integers are 32-bit, so you're limited to 2GB arrays before you have to take bizarre measures to access larger amounts of data.

Although it is standard in high-level systems to call out to a BLAS library [1], for some inexplicable reason it seems that both R and NumPy use the reference BLAS by default, which is quite slow – around 4x slower than better BLASes. Matlab ships with Intel's proprietary MKL, which includes a very fast BLAS implementation, while Julia ships with OpenBLAS, which is a similarly fast open source BLAS implementation derived from the legendary GotoBLAS [2]. Since all BLAS implementations share a common Fortran ABI, it's easy to swap them out, but it's not quite true that all of these systems are using the exact same Fortran code.

[1] https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprogra...

[2] https://en.wikipedia.org/wiki/GotoBLAS

Re: FastR: An implementation of the R language in Java [pdf]

#33

The Relite mention at the end looks very worthwhile. We were just about to begin a large rewrite of analysis code from R to CUDA; Relite has the potential to save the effort of rewriting our existing code.

Relite author here. I'd love to learn more about your use cases, feel free to get in touch!

Definitely, thank you for the offer. I'm running through the install now but will send you an email once I've run a couple tests. I see your contact info is listed on your home page.

Re: FastR: An implementation of the R language in Java [pdf]

#34
post #22

Earlier quoted context omitted.

1. It is more a philosophical disagreement than a problem, and whatever the semantics you want, the JVM does not limit you. The disagreement revolves around the Java compiler and language semantics, not the JVM. 2. The math in FastR, if I understand the presentation correctly, is performed by FORTRAN libraries anyway. Using battle tested FORTRAN libraries for matrix computations is common practice in C, Java, Julia,…

I do think that Kahan's objections to Java's floating-point support were more than just philosophical, although it's unclear to me at this point how many of them still apply. The biggest issue that seems to still remain is that you can't change rounding modes or check flags, both of which are essential for verifying numerical stability and correctness. Far worse than any floating-point issues on the JVM is that your…

There is a lot of work going into designing java arrays "2.0", including support for "long" arrays, immutable arrays, and arrays of structs.
Post reply on HN