Rust halved our computing bills
![]()
I run a small data science company called Numerical Works. Like many businesses, one of our clients approached us. Like any other business, this one too likes to know what’s happening in their business as well as how global forces are affecting them.
Our team set to work, and we started modeling the business and the immediate world around it. Coming up with models was not difficult, but these models need to churn huge amounts of data. These models need to change themselves as and when they diverge from reality. This required a huge amount of compute. We first used Clojure to model the world. But soon the Java start time and stop time became a huge cost. It was then that we decided to move to Rust. And my God, it was a really great decision.
The speed of our algorithms improved by one hundred and fifty times. Since that was just a small part of a huge ecosystem of tools we developed for this business, we weren’t able to reduce the computing bill by \(1/150\), but we did reduce the computing bill by more than half.
Personally, for me, it was an eye-opener. Similarly, for data analysis, we switched from Pandas to Polars. A lot of data analysis is first done by humans and then transferred to machines. So even then, the speed improved by 20x.
Another shocking discovery that we made was Bun. Compared to Node, it seems to be really fast, as it’s written in Rust. We can create apps & dashboards for our clients, and no matter how big it becomes, it compiles almost instantly (most of the time), or at least within a few minutes, if it’s a humongous project.
Unlike Python, Ruby, or Clojure, Rust is not an easy language. The first three languages I mentioned make the human the master of the computer. Rust makes a human a slave to the computer. A human must understand the internals of the computer so that he can program efficiently. But then, at Numerical Works, the scale of work we do and the amount of data we crunch for every client is humongous. Paired with AI, I think Rust can give us very good results, even without us breaking a sweat, as it’s the AI that is going to write the code, and we humans supervise it.
The technology behind Rust is great. I never thought somebody would dream of a language that needs no garbage collection. I am also very passionate about ClojuRust, a port of Clojure written in Rust. Clojure, according to me, is the best language for data analysis. Currently it runs on Java, which is a product of Oracle, so I’m not so fond of it. When it gets ported to Rust, we will break out of the shackles of the evil. Plus, our own experience with Java and Rust in terms of performance has made us vouch for Rust.
I’m not sure if I can steer my whole company towards Rust, but if that happens, I’ll be very happy.