this post was submitted on 15 Jul 2024
34 points (94.7% liked)
Programming
17326 readers
230 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
So at my previous employer I developed using Julia a custom ML model which ran, but the performance just wasn't good enough for what I needed despite trying to aggressively optimize. I ended up rewriting in Rust (and calling through R) which ended up being like 10x faster. At my current job I program a mixture of Rust and Python.
If Julia were more peformant then it could potentially be an alternative to Python/R users having to learn Rust - but if you're looking for top performance, some of your codebase is already written in R/Python, and you're already willing to learn another language, then learning something like Rust naturally seems the better choice over Julia.
The one thing I did like about Julia - it took barely anytime at all to build a working prototype.
@festus
In general, how much more performant would you say Rust is or can be than Julia? Any good resources on this?
What's interesting about this take is that it targets the whole "two language" thing and implies that it might be a fool's errand.
I think it really strongly depends on what you're programming - I know in some instances Julia's performance can be nearly identical to languages like Rust. I suspect in my case it related to Julia being a garbage collected language, as my algorithm involved creating very large dynamic structures in memory before serializing them, clearing the memory, and building another one. Since Rust has no garbage collector it knew exactly when and what to drop from memory. In my case I had roughly a 10x(!!) speed-up. Funny enough an even earlier version of that algorithm was programmed in Java, and Julia was roughly 10x faster that it, so Julia isn't the worst of the pack.