Member-only story

5 Simple Ways To Reduce Memory Usage In Julia

Taking a look at a package that helps to mitigate Julia’s Achilles’ heal.

Emma Boudreau
chifi
15 min readDec 27, 2024

--

introduction and thesis

Although I am likely one of the most vocal fans of the Julia programming language, even I do not hesitate to admit that every programming language is going to have its fair share of shortcomings. If you were to ask a sample of Julia users what Julia’s biggest shortcoming is, you’d likely get a lot of different answers. One of the most disappointing aspects of the Julia programming in my opinion is memory management. This is reflected off straight out of the gate when we start Julia. For example, I will start both Python and Julia on my machine and we will compare the two in a system monitor. Julia will cost about 80MB of memory.

Keep in mind, this is just starting the languages — my startup.jl is empty, this is just to run the language by itself. I am not typing anything in.

88MB is not terrible…

… but comparing this to Python we are looking at 2 MB, a literal two-percent of the memory usage just in loading the language. Initial memory usage on launch is manageable — we will likely want to manage memory a little more carefully and keep in mind that we are at this disadvantage from the start. Our project is…

--

--

Emma Boudreau
Emma Boudreau

Written by Emma Boudreau

i am a computer nerd. I love art, programming, and hiking. https://github.com/emmaccode

Responses (8)