6 ms·
For me the issue manifested as a 10 sec latency to format a Julia file using Format.jl Solved via flags to disable JIT and brought it down to a couple of secs.
by adsharma 5y ago
For me the issue manifested as a 10 sec latency to format a Julia file using Format.jl
Solved via flags to disable JIT and brought it down to a couple of secs. Native binary would be much nicer.
- enriquto 5y agoTwo seconds to process a tiny text file enters well into the realm of "completely unusable" in my eyes. It wouldn't be so bad if the Julia developers acknowledged that this is a valid concern (that they are not dealing with it right now for whatever reasons) and that the ecosystem will not be considered complete until this fundamental problem is solved. But this is infuriatingly not the case. Instead, they tell you that you are "holding it wrong" and that this is not really a problem, that your usage is "niche", that the interpreter is alright as it is, and that the time to first plot is unlikely to ever go below a hundred milliseconds. I find it really depressing for the language itself is incredibly beautiful. My only hope is that an independent, fast and unix-friendly implementation of the language arises, thus freeing the reference implementation of the efficiency burden and allowing it to be simpler. Something like the lua/luajit split.
- krastanov 5y ago> the time to first plot is unlikely to ever go below a hundred milliseconds How is that controversial or disappointing!? Why would anyone bother optimizing this? Nor is matlab/octave/python any faster. `python3 -c "import matplotlib.pyplot as plt; plt.plot([1,2,3]);"` takes 600ms on my (powerful) workstation and that does not even include creating the plot window. To be clear, I do believe there is much more work to be done to decrease latency in Julia, but your targets are ridiculous. And as a regular on their bugtracker and forum, the devs definitely acknowledge these issues and have many times said it is one of their main priorities. By the way, if you want streaming live updated plots, this latency to first frame is not a problem. It is already straightforward to make such fast live plots in Julia (although it does not fit my personal taste for how to do it).
- enriquto 5y ago> your targets are ridiculous Only because you are not used to somewhat fast programs: $ /usr/bin/time -v gnuplot -e 'set term png; plot sin(x)' > sin.png ... User time (seconds): 0.02 System time (seconds): 0.00
- krastanov 5y agoCome on, it is silly to compare a full general purpose language against a special-purpose tool. Yes, grep is also better than julia at searching for a string in a file. Julia is a terrible replacement for gnuplot and gnuplot is a terrible replacement for julia.
- enriquto 5y agoSure! That's why I set a somewhat reasonable target at being just 5x or 10x times slower than a specific-purpose plotting tool. But even that is considered to be chimerical! (or, in your words, "ridiculous")
- krastanov 5y agoNow you are just putting words in my mouth. I would completely agree that 10x latency to first plot is a reasonable target (i.e. first plot in about a second, like you get in python and much faster than what you get in matlab/mathematica). And plenty of devs closer to core of Julia and the plotting libraries in it would agree. And to be clear, I do expect my second plot to be ready in tens of milliseconds.
- reikonomusha 5y agoWhy is it such a ridiculous comparison? Gnuplot is still interpreting a language, loading plotting code, etc. If Julia folks wanted to, they could bundle pre-compiled plotting code that loads as fast as memory moves bytes. They don’t want to, of course, likely because it’s inelegant, but they could, and a general-purpose language doesn’t stop them from doing that.
- sgt101 5y agoI'm not saying you are wrong - but why 100ms and not 50ms or 200ms or 2000ms?
- KenoFischer 5y agoI promise ecosystem will not be considered complete until this fundamental problem is solved. That said, you can have time-to-first plot below a hundred milliseconds right now if you put Plots into your system image - that's always been an option. System images have workflow issues which is why they're not used more.
- enriquto 5y agoSounds great, thanks! That is certainly reassuring to hear. I'm very happy to see Julia evolving. EDIT: also, sorry for the mis-characterization of Julia developers! I may have dealt until now with users and "fanboys" not real devs.
- DNF2 5y agoI wonder where you got the impression that latency and precompilation performance are not valid concerns. This has been the _main_ focus area for the devs for a long time. It's pretty much all anyone has been talking about for over a year, and serious improvements have been made. Here's a blog post that goes into some detail about the ongoing efforts to improve compiler latency: https://julialang.org/blog/2020/08/invalidations/ https://julialang.org/blog/2020/08/invalidations/
- enriquto 5y ago> I wonder where you got the impression that latency and precompilation performance are not valid concerns. Now that you ask it, I realise it's been mostly through a few HN interactions! Every time I raised the issue in Julia posts over the last few years, I have been consistently ridiculed by purported Julia defenders. For example, in this very thread you can find a case of that.
- DNF2 5y agoIt think that the discussions on HN tend to be quite combative, and members of the Julia community (including myself) can get a bit worked up over negative claims that we find overly sweeping. That could lead to some dismissiveness. I do get frustrated by characterizations of the interests of the Julia community that are very broad, and are also in evidence here. E.g. somewhere upthread one person claimed Julians are only interested in Jupyter Notebook workflows, which is a totally alien statement to me. Jupyter doesn't seem to have a very large mindshare as far as I can tell, I've never even tried it myself. Static compilation and analysis comes up regularly on Discourse, but among the scientist part of the community, there is naturally less emphasis on this. Please don't extrapolate too far based on some isolated interactions.
- xiaodai 5y ago> they are not dealing with it right now for whatever reasons eh..., it's open source. maybe they are just waiting for you to take care of it. just joking. i suspect there isn't ppl