top | item 37847152

(no title)

BrandonS113 | 2 years ago

no, the function it calls is pure R and that is where the the code spends all its time.

discuss

order

n4r9|2 years ago

Interesting. Have you published the code and/or benchmarks anywhere? This flies against everything I've read about Julia and R.

BrandonS113|2 years ago

No, its 4 lines of code. I just benchmarked for myself. All it is for 2 vectors x and y of average length 50, and 5 parameters, with exponential, addition, and multiplication, and ultimately sum to return to the optimizer. I was also surprised as I expected c to be much faster. And with Rccp, its actually slower than the R, overhead I guess. When I looked into it, apparently R has really fast code for such vector calculations. With julia, admittingly I did not use simd which would likely make it faster.

Now, I generally use Julia for heavy computes, and usually its much faster than R. But not always.

And this little bit of code runs for hours on the largest instance on AWS every day. Why I was looking so speed it up.