I just did a “using Plots” in 1.6.0, and it was fast enough to not care about the delta between Plots and, say, R loading ggplot.
Huge kudos to the Julia team.
All four take seconds to start (or even less), and Julia felt like a huge step back in productivity.
If it's really fixed, might be good trying again.
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.6.0 (2021-03-24)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
(@v1.6) pkg> add Plots
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Installed Qt_jll ─ v5.15.2+3
Downloaded artifact: Qt
Updating `~/.julia/environments/v1.6/Project.toml`
[91a5bcdd] + Plots v1.11.0
Updating `~/.julia/environments/v1.6/Manifest.toml`
[ede63266] ↑ Qt_jll v5.15.2+2 ⇒ v5.15.2+3
Progress [========================================>] 246/246
246 dependencies successfully precompiled in 140 seconds
julia> @time using Plots
3.689727 seconds (6.58 M allocations: 472.965 MiB, 7.49% gc time, 0.13% compilation time)
julia> @time begin
using Plots
x = 1:10; y = rand(10); # These are the plotting data
plot(x, y)
end
3.050765 seconds (3.63 M allocations: 218.824 MiB, 4.87% gc time, 59.07% compilation time)
julia> @time begin
using Plots
x = 1:10; y = rand(10); # These are the plotting data
plot(x, y)
end
0.001435 seconds (2.61 k allocations: 161.836 KiB) julia> @time let
using Plots
plot([sin, cos])
end
11.267558 seconds (17.98 M allocations: 1.114 GiB, 4.83% gc time)
Versus Matlab which probably takes about 15 seconds just to open the editor but plotting is very fast. >> tic
fplot( @(x) [sin(x) cos(x)])
toc
Elapsed time is 0.374394 seconds.
Julia is just about as fast as Matlab after the first run for plotting.The downside is that generating system images can be quite slow, so we're still working on ways to generate them incrementally. In any case, if you're inspired to work on this kind of stuff, it's definitely something the entire community is interested in!
That however means that some packages get a preferred status in the Julia ecosystem.
Try this:
matlab -nosplash -nodesktop -r "tic; fplot( @(x) [sin(x) cos(x)]); toc"