Julia Slow? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Julia Slow?

Has anyone dabbled in Julia before? I just tried tinkering with it and for being advertised as super fast when I tried to plot just a line it took 8 seconds!?!?!?

23rd Sep 2020, 5:20 PM
Sam
Sam - avatar
7 Answers
0
I've been looking around and it seems more people are complaining about Plots being slow. Most of this slowdown is frontloaded, so rendering second plot should be very fast. Still, it's mostly known problem and apparently working solutions are a bit too complicated for me to understand.
23rd Sep 2020, 8:12 PM
BlazingMagpie
BlazingMagpie - avatar
+ 2
Do you mean the Julia programming language or do you mean the Julia Set fractal? If you mean the Julia Set fractal, the slow time to plot could be related to your drawing procedure. The underlying calculation is usually very fast but if you draw each point using a tiny rectangle or circle, yeah that could be in the order of 100 times slower than writing to an off-screen pixel data array. Max iterations being many 1000 can make Julia Set very slow to calculate but there isn't much need to do that if you just want the aesthetic appeal of the pattern. I implemented a fractal viewer at: https://code.sololearn.com/WVhoMHzy3K81 It starts showing a Sololearn-inspired fractal but you can select Julia Set from the dropdown menu. I have a Mandelbrot Set fractal example using GPU code at: https://code.sololearn.com/WiH4n0rrvD1B/ It could be adapted for Julia Set quite easily and would render every frame in a tiny fraction of a second.
23rd Sep 2020, 6:30 PM
Josh Greig
Josh Greig - avatar
+ 1
BlazingMagpie it was faster the second time 🤔
23rd Sep 2020, 8:29 PM
Sam
Sam - avatar
+ 1
It runs slow first time around for some reason. There's a technical explanation for this but I'm too lazy to fetch it right now. Maybe I'll come back later with the info
8th Mar 2021, 4:37 AM
Neur0s1s
Neur0s1s - avatar
0
Josh Greig i was talking about Julia lang but this is a super neat viewer!
23rd Sep 2020, 7:32 PM
Sam
Sam - avatar
0
Plot a line? You mean graphics? What are you using for graphics? Or are you using Plots package?
23rd Sep 2020, 8:01 PM
BlazingMagpie
BlazingMagpie - avatar
0
BlazingMagpie i was just using the Plots packages and the example used in the docs. https://docs.juliaplots.org/latest/tutorial/
23rd Sep 2020, 8:03 PM
Sam
Sam - avatar