4 ms·
"In their trial run, Julia was much faster than R. But I objected, because random walk is a sum. Thus one can generate the entire process in R as vector calls,
by gaze 11y ago
"In their trial run, Julia was much faster than R. But I objected, because random walk is a sum. Thus one can generate the entire process in R as vector calls, one to generate the steps and then a call to cumsum(), e.g."
You missed the point. Everything is fast when you export what you're doing to a library. Julia is fast when you do, and when you DON'T.
- trymas 11y ago+1, wanted to say the same. P.S. that function name though...
- epistasis 11y agoBut not using the language's idioms is not a fair comparison. In modern times, vector based thinking like that that's present in R or numpy is the only sane way to program. Because these are not "library calls," they are the primitives of modern architectures.
- idunning 11y agoThe problem is that you may have to stray outside that vectorized bubble, and at that point you enter into a two-language situation if you are using R (e.g. RCpp) or Python (Cython?) - which was one of the motivations for the whole Julia language, to avoid needing to do that.
- epistasis 11y agoBut that's no excuse for a bad benchmark. If it actually were necessary to stray out of vectorization, then the Julia benchmark would have a point. But those cases are few and far between in what I have experienced, and apparently in what the benchmark authors have experienced.
- JupiterMoon 11y agoScientists don't want to have to change the way they think to solve every single problem. We want to code something yesterday that solves today's problem and move on. A language that allows us to use simple idioms will be awesome.
- epistasis 11y agoGiven the popularity of R, I would argue that scientists prefer those idioms to the more staid serial and imperative methods of Julia. I think that scientists are much more likely to enjoy the lisp nature of R than the code-monkeys that get caught up because arrays start with 1 instead of 0.
- JupiterMoon 11y agoNo physical and life scientists do not in the general case care about how "lisp nature" or "serial and imperative methods". We use R because there is a package in CRAN for the calculations we want to do -- and because our colleague/boss does. Often we will use loops because the mental effort of coding a vector solution can be higher
- srean 11y ago> scientists are much more likely to enjoy the lisp nature of R That confused me a great deal. Julia seems more lispy than R. From the comment section it seems that you have perhaps implicitly decided apriori that R is better. So you would rationalize out of evidence and examples of situations to the contrary.