-
Notifications
You must be signed in to change notification settings - Fork 60
Faster startup #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster startup #383
Conversation
|
I was testing time of first plot, not that I would seriously point people to using R/ggplot instead of Julia solutions (I was just curious if actually faster), and Note this is not actually tested, just copied Jeff's code from Plots.jl (and this only works faster, unlike You have to make sure this applies for other code to, potentially it could slow down, but I'm not sure, but it's also done for PyCall.jl: JuliaPy/PyCall.jl#764 |
|
I tested with a real-word package (the only R package, I know hat has yet been wrapped). Note, this PR doesn't lower the performance of any wrapped R package in any way. It's only if you would call a R function very often (in a loop) and that R function is very fast, counted in nanoseconds, i.e. much faster than: The R function that is called in Alpaca.jl, takes only 0.2 sec. but to get there, there's a lot of startup cost, in total all (I wrapped the example there in a test.jl file) takes 30 sec. Julia defaults are 3.7x times slower, I take 73% of the time off, or 22 sec, or realistically 7 sec (24%), and your package is responsible for part of the 7 sec overhead: |
|
Now that Julia 1.5 is out, you should consider merging this PR. See e.g. speedup 2+ sec gain for RCall (and a package using it): You also have an invalidation problem (only a problem for speed), that SnoopCompile.jl can help fix |
|
I would just merge the PR. If you're worried, you or your users can run the code in the PR with the new option (I think effectively disabling it): |
No description provided.