I recently discovered that one can apparently distribute Rust projects on npm by compiling to wasm. action-validator used to do this. Had been thinking about something like this.
Genuine question, is this a common problem people see out in the wild? In my dayjob(s) I've basically never seen major slowness that comes from using something like nodejs / python, the bigger culprits have been network / db / bad architecture or code.
Yes. Python is usually 10-100x slower than languages like C, C++ or Rust. If your program is CPU bound, this shows up very obviously. If it isn't, you may never notice at all.
Imagine being able to use only 1% of the machines you used to require, by migrating away from Python. This is very realistic for companies doing heavy computational work.
What you're saying is valid too; but, the post you're replying to implied most slowness is network (i/o bound) or bad architecture (accidental cpu bound, fixable by tech debt cleanup).
That post was also asking if other people have seen language mattering. In the places where I've worked programs are often CPU bound. Places like these are why compiled languages are still alive and kicking.
I'm not denying that domains exist where being I/O bound is a thing. For those cases Python can be a fine choice.
We all have different lenses on the makeup of the entire set of software out there, it's likely you're coming from that experience and the other post was coming from experience mostly with i/o bound software.
For cpu bound stuff the language makes potentially an enormous difference; but then you get to trade off: eg. if you're not gonna need a fast language you are free to choose based on other considerations.
I'd make the case that everything on a computer is CPU bound depending on scale, even your crud app. Half the time when somebody is saying that X is I/O bound, they actually mean that it's bound by the performance of their database - which wisely, in the real world, is not written in python.
edit: and, of course, things in python that would run terribly slow if written in python become primitives, which are written in C. Python is a C program.
Libraries generally write hot code in languages like C, C++, or Rust and bind that to Python (PyTorch, etc.) or provide bindings/wrappers around libraries in those languages (SQLite, PostgreSQL, etc.).
As with anything performance related you need to profile the code with realistic data/workflows and identify the parts that are slow.
Typically, doing things like changing algorithms, data structures, careful use of caching, reusing calculations, etc. are more important to performance than the choice of language.
> Typically, doing things like changing algorithms, data structures, careful use of caching, reusing calculations, etc. are more important to performance than the choice of language.
The choice of language determines the extent to which those things are possible. In case of Python using C libraries sometimes means that you pull data from somewhere, hold them in Python memory in very inefficient way, pay for transformation to another form that C library uses and then do the same in reverse at the end. Perhaps even more times if C doesn't handle everything. "Use C libraries" often works, but is not universal solution.
For example, PyTorch (and numpy IIUC) store matrices/tensors as a 1D array of numbers. This is more memory efficient as all the data is colocated.
They use a technique to store the distance within the array to move when moving along each axis (strides). This allows for operations such as transpose to be swapping the array and stride values instead of performing an expensive array/vector copy.
Another example: using string formatter or join instead of separate concatenations allows the compiler/language to compute the size of the resulting string up front (if the language/library supports that) rather than allocating on demand.
Another example: using a hash map/set instead of an array to check for the presence of strings.
Yeah, Python is one I where I find moderate amounts data can be a pain - I end up tempted to move CPU work to the database or precompute more things, and it’s hard to get the advantages of single binary programs (for deployment, startup time, etc).
(For big data you can use Python to drive some native code frameworks - it is good at that, for tiny data it’s irrelevant because there’s not much to do, but the moderate case gets awkward).
Performance is broader than just slowness; it’s also CPU and memory usage, things which will force you to scale horizontally (multiple machines) much sooner.
In mid-2013, NewsBlur described in some detail their deployment and statistics. Python/Django, 48 servers. I confidently calculated that, with implementation efficient, one would be sufficient, though with little headroom, and further vertical scaling might have started running into I/O limitations. (I doubt a single server would be possible any more.)
It’s popular to scale horizontally far earlier than you actually need to. And if you can commit to sticking with vertical scaling (single big machine), you can simplify (and further speed up) things enormously.
They’re risky in that sense, but their very simplicity makes them less subject to other sorts of failures—distributed systems have more and more complex failure modes.
Personally I think it’s a very good trade-off for vastly more businesses and services than actually practice it.
I suspect I may have seen more systems run into availability problems from unnecessarily distributed architectures than from hardware failure, and I’ve definitely seen costlier development due to it.
Maybe. When I stress test my JavaScript application I can push up to 6,000,000 WebSocket messages per second in Node (C++) but do experience some amount of memory instability. When I run the same application on Bun (Rust) it’s not as fast but it’s extremely stable.
In all fairness 6,000,000 messages per second across a single socket is likely an unrealistic scenario but application stability over multiple months pushing out message traffic across many sockets from many servers under a single application process is a realistic concern as is number of simultaneous open sockets.
Mostly because anything that needed to be fast already was written in a language that allows that and most of web/app development focuses on shuffling small amounts of data around. Also pure Python is worse than node in this aspect. Still, there many non-trivial cases. There is a reason most of infrastructure moves to Rust. I've seen poetry spending 30min (!) on dependency resolution once. Test runners and some background/nightly data processing if often first place where you realize you may want to rewrite.
In my experience memory issues are more common. The way JS stores objects in memory is fundamentally inefficient (though it’s deliberate, it’s why you can do object.propertyIJustMadeUp = true on anything, any number can be a float, etc) and if you’re moving a ton of data it can cause issues eventually.
The only JS-native answer is to use typed arrays, which is using a sledgehammer to crack a nut.
Yes. Most often with Python. People think performance isn't going to be a problem and by the time it inevitably is, it's far too late to use a better language. (At least before AI.)
I've seen this at almost every company I've worked at.
I recently built a small nextjs/node application that basically makes like $50 usd monthly. Initially built as a PoC, I wanted to place it in a vps so that I didn't have to maintain it in my home laptop, and also because I wanted to move it to a Europe location for better business performance [im in mexico and latency is high].
Thing is, the TS app weighted around 4GB overall and took 2s to do its thing. [A backend process, an http api and a static website generator].
I needed to decrease the size and increase performance dramatically,to be able to put it in a 2GB 2vcpu instance, which costs $12 monthly. Otherwise it would eat the profit.
Claude ported it to Rust, in around 2 days total. And it went down to 1.5Gb max, and 1/10 of the CPU usage. Now it sits in the aws europe zone making money.
What exactly is it doing during these 2 seconds? What did it stop doing for those 2 seconds to become whatever it is now? Did Claude use a different (more fitting) design, architecture and data structures perhaps? Did Claude also write the initial version?
Processing input from a websocket, and then doing some calculationsand http requests [which need low latency, hence the Europe server].
Apparently a lot of the node baggage was due to Garbage Collection, which Rust doesn't need. Also, immediately transforming incoming JSON to binary data helped.
Yes, to both: claude wrote the initial architecture, under my guidance. As I mentioned it was a PoC, so the first pass was "quick and dirty". Shit the original web server was React [which i didn't count for the comparison because barebones node can serve static pages as well.
It has been a cool experiment which started as a crazy idea, but now as I said gives me some spare change. I just SSH tunnel every day or two and load the web page to see how things are going.
Python and Ruby are single-threaded (yesyes, there's noGIL python now), which in turn means they're deployed as multi-process services, which means they must be stateless, which means there is a lot less you can keep in-memory and need to offload to external stateful systems. And that's how you get your bad architecture.
And python being interpreted and dogslow means any heavy computation you write in pure python needs to be offloaded too instead of just putting it on a threadpool, again making your architecture more complicated.
Add in serverless functions, which need startup, and now something that should have taken microseconds will take seconds.
Node is JITed at least, but still no shared-memory multithreading, so it still encourages all the architectural bloat.
> deployed as multi-process services, which means they must be stateless, which means there is a lot less you can keep in-memory and need to offload to external stateful systems. And that's how you get your bad architecture.
Depends what you are doing. Not a problem for something like a CRUD web app. Not a problem for most desktop apps.
> heavy computation you write in pure python
Why would you write heavy computation in pure Python?
Fields like stats or data science are often heavy computation in python. Even R. Single thread does not matter, because this python run might be one of some thousands+ you have a cluster chewing through 1 per cpu core.
We took this route in a Python web framework I maintain: route matching, JSON encoding, request body parsing, compression and some other specific parts moved to Rust with PyO3, everything else stayed in Python.
For the parts that scale, yes. I build a CI step for measuring the performance with Callgrind since last pure-python release, and we achieved good numbers: matching the last of 200 routes dropped to about half the cycles and serializing a large JSON to about 25% less. So it pays off for work that grows with the input.
It's also OK to rewrite in Rust because it's not just about performance. The fast part in other Python, Ruby, etc may be written in C/C++, or call an external library, and be the vulnerable part.
Exactly, seeing the AI vulnerability hunting apocalypse happening around, I would rewrite in safe Rust to avoid certain types of security issues. Speed and low memory usage is just another bonus.
What does %LANGUAGE% have anything to do with the goal? Totally same principles apply for any other lower level language: Zig, C.
While Rust is awesome, a lot of times the only apparent reason to chose Rust over C is virtue signaling.
Update: like I said, Rust is awesome and has so many advantages over C it's not worth a discussion really. But again I see that many projects are choosing Rust not because of merits but simply because it's a fashion.
Today I added Rust checked arithmetic which detects and protects math bugs such as integer addition overflow and division by zero.
Rust checked arithmetic is built into Rust's standard library (std) via explicit methods on primitive integer types (such as checked_add, checked_sub, checked_mul, and checked_div), which return Option<T> and evaluate to None on overflow. There's a known tradeoff of some speed, which is fine for my purposes because I need reliability more than raw speed.
I'm longtime C coder so I know how to do this in C. Rust strong types and static analysis make it so much easier to do correctly.
You can build okay abstractions and then to maintain them you have a pinky-promise system so it doesn’t matter. You basically can’t build any abstraction in C because you can’t make a guarantee about… well… anything. Anyone at any point can just break your abstraction. And they will. At 100 lines of code maybe you can see that they don’t, but most projects are bit larger than that.
Even very basic abstractions possible in basically every language, like say a type that holds JSON text, is not possible in C.
You can build types around structures and access them via wrappers. This works perfectly fine for many abstractions. Sure, one can break those abstractions, but not accidentally, and this is true also in other languages.
Update: In fact, you can also build quite reliable abstractions around incomplete structure types. Those abstractions are better than what C++ adds, where the abstractions in the header are all very fragile.
That's actually why we chose Rust over C at my new company, Virtual Signaling as a service™. We rewrite anything in Rust for companies looking to virtue signal.
> the only apparent reason to chose Rust over C is virtue signaling
If you'd said another memory safe language I might have been on board, but C? We've seen a complete collapse in the ability of software to go un-hacked and un-exploited. Not all of that is down to poor memory safety of course, but it's a category of vulnerability that is massively increased in both surface and risk by choosing to write C.
Choosing Rust alone might be virtue signalling, but choosing a memory safe language is just pragmatic.
In this particular topic (performance) Rust matters because it will deliver excellent performance. You could write a container -> map -> map -> container flow in fifty memory safe languages, but probably it would be a bit slower than the nasty hack you'd write in C to convert the data in place. Rust isn't, if you're intrigued you will discover that Rust 1) figured out that the two containers must be the same size in memory so it can re-use the original container and 2) did the in-place conversion even though that wasn't what you wrote, because it's faster.
So magically the Rust was just as fast, but much more readable and when a junior (or an LLM) modifies it slightly so that the output container is bigger it won't suddenly segfault due to that scary in-place conversion loop now being a bounds miss, the Rust won't attempt the in-place conversion now that it can't work.
You've received downvotes, but I'll do you the kindness to actually answer you.
Firstly the obvious, LLMs aren't perfect yet, they still make mistakes.
But even if they could achieve safe C by asking them to "Write Safe C, Make no mistakes", there would still be a significant benefit to achieving safety by using Rust or a memory safe language.
LLMs work best when they have a combination of clear objective functions and guardrails. In this case, the compiler acts as a guardrail to keep it safe while trying to solve the problem that needs solving.
Having a compiler step prevents the LLM taking a "shortcut". Despite models improving, they will still take shortcuts, sometimes absurd ones, to meet some definition of a "job done".
The other massive benefit is cost and speed. Having an LLM analyze and reason about the safety is expensive and wasteful. Having this done at compile time is cheaper and quicker. The earlier in the feedback loop, the cheaper it will be.
Save your tokens for "real" work, not stuff you can check at compile time.
> a lot of times the only apparent reason to chose Rust over C is virtue signaling.
Quite the opposite. Outside of a couple of very specific kind of cases (for example working with microcontrollers not supported by Rust toolchain), there is no good reason to choose C when you could choose Rust.
Choosing C over Rust means throwing away the memory safety features that Rust gives you for free. And for what? There is just no upside to choosing C in the vast, vast majority of cases.
Rust protects you from a whole class of bugs (borrow checker) and lets you enforce almost as many invariants as you chose, through the type system.
LLM are just as bad as humans at enforcing/tracking ownership and invariants.
We maintain two code bases; one is TS and the other Rust.
Both are by now written foremost by agents (since August 2025, I'd say).
We had numerous non-(business)-logic bugs in the TS code base over this period.
Zero such bugs in Rust.
Because the compiler catches them for us.
All bugs we had in that code where actual logic bugs. I.e. the spec already had the bug or contained an oversight.
Zero.
We have since started rewriting the TS code base in Rust and will likely switch over in the next three months.
Seems like just virtue to me. The guy who volunteers every week to pick up garbage from the beach isn't virtue signalling, he's just virtuous. The guy who came once, with a film crew and left once they'd got the shots they wanted - that is virtue signalling. They're both shown in the film, but only one of them actually does the signalled virtuous activity when the cameras aren't rolling.
You could argue that RIIR was conducted as virtue signalling if what we saw was one of those translations smeared in unexplained unsafe blocks, with rats nest logic that no human is going to untangle. But that doesn't seem to be the case here.
This cope was common 20 years ago with Python. It rarely worked out. It's rare that 5% of your program is taking up that large a percentage of your execution. It's usually much more spread out than that.
Also, we have LLMs now. Rust should be the default for many things.
"Also, we have LLMs now. Rust should be the default for many things." ...
Or C Or Go Or ... Its like people can not look past one language, to understand that with LLMs, a ton of languages gotten way more easy.
Personal experience that running a few subagents parallel with Rust, just slows everything down to a crawl, even wit ccache and a ton of other tweaks. As long as your codebase is a few 100k lines, Rust is ok. But start going in the 500k, 1 million... starting to get C++ flashbacks where your spending more time waiting on the compile jobs, that fight each other for resources then actual testing.
Until Rust can fix their slow and resource munching compiler, its been off the menu for me. Ended up having everything in C and the difference was very noticeable.
A lot of lost performance also comes from things like the architectural decisions and technical debt that would pile up over time. These considerations are also like sand in that they're coarse, rough, irritating, and they get everywhere in the codebase.
Oh, and they can be annoying to refactor later on.
Using the right data structures for the right usage later on is like half the battle. People get really annoyed when you show them a Python program that is faster and shorter than someone's C# program, merely because they used the wrong data structures for how it's being used.
One of the nicest things of Java is that a list is a List<>. You can start with the default ArrayList or use a ton of other variants, or write your own, and all that changes is one line of code
One of my biggest beefs when moving Java -> C# back in 2004 was the paucity of collections in C#/.NET. There was C5, which was good, and the framework itself did eventually improve a little, but it was still no match for the Java standard library + Apache Commons Collections.
That and WinForms absolutely sucked compared to Swing. Layout options, tables/grids, and trees in particular were very poor in WinForms. Not to mention custom control development was far better in Swing than in WinForms. It was annoying because the one thing I’d expected to be better with .NET was the desktop UI framework.
Exactly my experience. You can make Python code faster by profiling and improving the hotspots, but once you've done that it will still be 10x slower than C++/Rust at least, and that slowness is evenly spread through the whole program.
The number of use cases where you actually can move just a small part of the program to C++/Rust and that solves performance is actually really small. Basically highly numerical things like AI or SMT solving. Even supposedly IO bound things like Django tend to be quite slow in Python.
"""If you're looking for the next win, you don't have a hotspot. The CPU profile might look even-Stevens across the board. Let me give you a really simple example of this, I used to work on the [Edge] browser and you could find yourself with a significant regression one week and you're using way more CPU, and you look what the functions are and it's the same functions as always. It's layout and it's style computation, and that code hasn't changed a byte. It's the same excellent layout engine, it's the same excellent style engine, and yet the profiler will tell you you're spending way more time in layout. What's happened?
Somewhere in your code is a little whammy where someone invalidated a bunch of tree nodes which took about 8 nanoseconds and caused the layout engine to now do tons of computation that it didn't have to do before. No profiler in the world is going to save you from this problem, it's going to tell you that the problem is in the layout code. Well duh, thanks for that, of course the compute is in the layout code, it's always in the layout code, all we do is layout and draw. So I have to find the 3 nanoseconds where somebody invalidated something that they have no business invalidating because it's wrong. And the way you fix that is [to have a sense of how to check that you're invalidating the right thing, regression testing, visualizations, logging, planning] and it could be literally 4 or 5 instructions dirtying the cache and that's not going to show up in a profile.
[paraphrasing; Casey: if you've developed the whole browser without caring about this, at the end you're going to find it very slow and not be able to squeeze any more performance out of the layout engine? Rico: Right, this is not something you can fix at the finish line, it needs a plan]"""
That is just due to not using good performance observability tools. These sorts of problems are easy to see with a full instruction trace that uses good, standard visualization on a problem case.
Not my experience, actually. Numba and other such techniques (like having some hot paths in C/Rust/whatever) works, but eventually just allocating and deallocating Python objects starts to become a measurable problem. Especially if you have any kind of fancy metaclasses, descriptors, etc. "So don't"--ok, so give up Python's dynamic features? Why bother at that point. Now it is so cheap to write code anyway, why bother with Python at all? Have a design document in actual English.
Hell no. Rust is easier to read, write, maintain and reason about.
Way more people know Rust than Python/Python internals/Numba interactions.
Numba will either get you relatively low gains with little effort,
or push into territory very you write code few people will understand, because reasoning about its performance requires deep knowledge of Numba and Python internals. Rust gives a lot more ROI and looks more like Python.
I'm... not so sure why you need a repo for that. It's almost 2027. You can literally just type "profile this app and find out the performance bottleneck" then "rewrite it in rust" in your agent TUI...
I would like to argue that one could make most codebases 50% faster if rewritten from scratch with performance in mind even in the same language.
Taking python as an example, one could use benefit of hindsight and make better decisions from the start ( offloading slow parts to C binaries, better DS decisions, eliminating bloat etc.. ) if they rewrite the same app in Python. This is kind of what happens when a program gets rewritten to another language ( Rust ) - better decisions are made from the start and less bloat is copied over.
Yes, obviously there are exceptions to this. But most of the time it is the choices we make that make the program slow and not the language itself.
It used to be that rewriting programs were almost always a dumb idea due to how much effort went into it - see: https://www.joelonsoftware.com/2000/04/06/things-you-should-... . But AI has made this argument less compelling imo. I now regularly rewrite big chunks of programs with various end goals given to the agent.
I mean, it's definitely both. Of course there can be algorithmic improvements, but a like-for-like rewrite of Python code into Rust can often be 10x faster.
Depends on the application. Tbh the comparison btwn python and rust is kind of dumb. But for the sake of argument - I don't think most well-written Python codebases can get 10x faster by using Rust. Bit faster ? sure maybe. Remember Python uses C under the hood. Unless there is a shit ton of looping or weird unrealistic conditions i don't think this is true
I think it totally depends, I’ve seen huge (100x) speed ups by moving a pure-python CPU heavy task to a compiled language. If you’re using something like numpy already to run compute natively, then yes it’s probably much more difficult to get gains.
Don't forget 10x iteration time and deploy time due to building on large projects. Still can be worth it, but I highly recommend build costs (CPU, RAM, Disk, Time) are considered in a rust rewrite decision. I'd even architect around it from the start as it can really add up.
See uv - replacing pip with a rewrite in Rust was a good stunt, but the big performance gains came from eliminating dynamic features (uv doesn’t allow packages to execute code when installed) and I/O (better caching and parallelization).
Though to give credit where it's due, it's a lot easier to parallelize things well in rust than in python. The coarse-grained download parallelism is easy in both, of course (though with higher overhead in python), but the more fine-grained solver parallelism favors rust (or c/c++ but let's not do that).
Every cursed rust application I've been hired to fix has been diagnosed as spending 90%+ of its time pointlessly jumping tokio threads because someone thought that async means fast. I give these 10x throughput boosts by removing concurrency or, sometimes, just rewriting them in Go.
You're talking about concurrency and I'm talking about parallelism. :-)
Rust's async situation is still a pain in many ways.
But throwing Rayon at something often results in very reasonable parallel performance gains without cluttering things much. It usually won't get you to an optimal solution, but it's good for 80% with 10% of the pain.
It depends on what you are going for: service latency, or throughput. Rayon's work stealing is inappropriate for any throughput oriented work and questionable for the majority of latency sensitive services. It does have a niche but it's not the first thing I would reach for. Unfortunately it IS the first thing Claude reaches for.
That's why the rust server I work on is an unholy mix of threads and tokio...
The performance oriented (data plane) work happens on dedicated, cpu-pinned threads and sockets outside the tokio runtime. The control plane work happens in tokio async. Interaction between the two is tricky. But decreased latency and increased throughput is valuable. And it's a complex server, so we can't really try too many approaches.
It certainly doesn't help that the data structures are, by necessity, a cephalopod that have to be used across threads.
Everything wants to push you down the path of using `ARC<Thing>` even when `Thing` is immutable or the lifetime can be mostly guaranteed.
Here's an example of that problem. Let's say I want to do 2 things concurrently against the same data set. I might want to write code that looks like this:
let v = vec![1, 2, 3];
let taskA = tokio::spawn(async {
println!("Here's a vec: {:?}", v);
});
let taskB = tokio::spawn(async {
println!("Here's a vec: {:?}", v);
});
tokio::join!(taskA, taskB);
But that immediately gets you in hot water because "async block may outlive the current function, but
it borrows `v`, which is owned by the current function"
Now, you and I can clearly see that the async block does not, in fact, outlive the current function. However, AFAIK, there's no real way to convince rust that that is the case.
So now even though `v` is immutable, making this a thread safe operation, we need to introduce unnecessary concurrency constructs or break out unsafe in order to force the language to recognize that "Yes, you can trust me".
For rust to actually be fast with concurrent operations, it needs to be smarter about lifetimes in terms of async.
I think the biggest win of going from pip to uv is that breaking your python environment no longer breaks the tool to manage your python environment. Pip was always fragile in that you could carelessly use it to break a library it is depending on. (Yes, there are ways to avoid that - but they require not being careless.)
I once, on a fresh Ubuntu install, did "apt install python-pip3", and then "apt install python3.8" when I realized I actually needed Python 3.8. The pip3 complained that it was outdated and suggested a command to run to update it. Naturally, I ran it, and it completely broke apt, it couldn't even do "apt list" never mind intalling/removing packages, so I had to rollback the VM to fix this bullshit. Wonderful, 10/10 DevEx.
I rewrote a C++ batch process in Python 1.4 (this was 1997) and the Python version was ~10x as fast.
The port was pretty direct, function for function. It was even line for line where language and library differences didn't offer an easier way. I was just trying to see if Python was so slow that we couldn't consider using it in production, and this was the most speed critical batch we had.
I assumed the speed difference was a bug that was skipping work, but that seemed unlikely because the output was correct. It turned out to be a bug in the C++ code that was needlessly reproducing work (an issue with cache keys). The bug was extremely subtle. When I fixed the C++, there was very little difference in speed as the batch was I/O bound when the cache was working.
So, adding to your point, sometimes you can greatly improve speed by rewriting in a slower language, even without performance in mind.
To be technical about it, the Python program didn’t match the behavior of the c++ program. ;)
But also technically I think your point still stands. Because rewriting it helped you find a defect in the original. Which did improve performance of the original.
It’s quite interesting the two implementations performance was so close in the end. Do you consider one implementation “better” for non-performance reasons? Maybe one type of dev is easier to find. Or one language is easier to create and maintain correctly behaving programs in your environment?
The Python version was far easier to maintain and add features to. We kept it and rewrote other code in Python whenever we did significant work on it. All new back-end code was also written in Python after that.
Hiring devs who already knew Python was not really an option in 1997. But we quickly found that there was not much difference in time to ramp up a C++ developer on our C++ codebase vs. ramping up a developer on Python plus our Python codebase. It was just a matter of finding developers who were happy to learn a language they may or may not have heard of, but had likely never looked into.
Over the many years I was writing code in C, I noticed that the original program design and data structures were very persistent, i.e. they were never reorganized. I suspect the cause is the tendrils of those choices found their way into everything, so reorganizing it was thoroughly impractical.
One of the problems, for C, is the use of . to access a field via a variable, and -> to access a field via a pointer. To switch between a pointer and a variable in a struct means you've got to re-edit large quantities of code everywhere. The result is just too tedious.
This was the motivation in D for using . for both. It turns out, it is completely unnecessary for having both . and -> as the compiler semantic pass can trivially figure it out. Eliminating this issue makes for much easier redesign of a data structure.
I actually don't hate that part of C. You have to acknowledge it's a pointer with a different accessor. I liken it to = vs := in Go. It's an unnecessary semantic, sure, but it elevates a technical detail to be part of the syntax of the language. Go has caught me a couple of times when I forgot I had the same variable name in scope already (e.g. opening a second file descriptor and trying to name it "fd" again).
My mind equates -> to "this could be NULL" without ever looking at the function signature.
It is way more of a pain in the ass for refactors than = vs := though.
> it elevates a technical detail to be part of the syntax of the language
For me that's definitely a bad thing. It's the reason I don't like Rust syntax, they make you write everything out even if there is no possible way to misinterpret the code. And they never do things like Zig enum variant shorthand because syntax sugar is evil. Maybe they're just diabetic.
I did an experiment to see how small and efficient I could make a desktop Linux app. One thing I learned is GPU adds a lot of memory overhead without much benefit for very basic apps.
Agree. I learned quite a few things in this exercise, actually. Another one is that conventional font rendering uses a lot of memory as well. Link below if anyone is interested:
There is the other argument to rewrite it in something - delayer complexity where it doesn't solve an understanding problem. This has led to a phenomenal code decrease where rust primitives tackle a ton of structured case handling while keeping code simple and readable.
Rust itself had an understandability issue until LLMs came along and started speedrunning parts of the Rust development process, so this argument is language AND time immaterial.
As we just saw in the MS outage, making it run faster might be introducing race conditions that were previously shadow conditions. You have the correct take. Rewrite the parts that are bad, not the parts that are slow.
Rubbish. There are at least three big reasons to use Rust:
* Memory safety
* Performance
* Logical correctness
People definitely rewrite in Rust for speed. To be honest I would say memory safety has been overegged as an advantage - yes obviously you want memory safety, but I think some people think it's the only advantage Rust has, when logical correctness (due to the stronger type system) is definitely in the same league.
As far as I can tell, the only reason people rewrite things in Rust is so that they can make HN posts about rewriting a thing in Rust that didn't need rewriting in the first place.
I recently did it only for speed honestly. Python is quite slow in many cases, like a small operation on millions of lines of text. I tried the rust version and it removed that bottleneck, it's quite easy with AI. It's mostly for manipulation of strings, for math we already have numpy, numba, pytorch etc.
But in many cases a rust version already exists (like for tokenization etc.). I wouldn't advise to write it yourself if a supported repo is already doing it.
ffi boundary often means you lose any gains from rust to packaging up the data and shipping it via c structs back and forth between the language runtime and rust
I don’t mind rewritting in any language. But the one in Rust looks more like led by asshole-like cult and for showing off to others than pure engineering purposes.
I didn't realize until I rewrote in Rust that psycopg2 is about as fast in Python as Rust database calls because it's all compiled in C. I had to do the full re-write because my code was going to live on customer machines and I didn't want them stealing IP. The speed, stability, and security boosts are just added bonuses.
Java - “1.18s, 3× (11× on the function; the rest is JVM startup)” - why are we including JVM start up? Can’t we assume Java is already started? We don’t start JVM for every function. Right?
Then absolutely rewrite it so that it uses Tauri instead. Which takes your executable from 300MB to about 5MB for something that actually does something meaningful.
It's certainly still "replace the slow (but really, inefficient, not just slow) parts", but instead of 5% it's 98%.
The reason rust is so tied to all the AI rewrites is because we see that the power of AI improves when the task has stronger verifiability. A stronger example is reverse-engineering: you have the final machine code to verify against. Performance of the final binary is still a bonus, but it's the strictness of Rust that makes it great for AI.
Rust here was mostly because they wanted to link to it. It has some benefits by itself, but the real killer feature was the e2e tests that they had for the effort.
First of all, start with the measurements methodology, making sure that you're measuring a thing that actually matters for end users in all the various configurations on a setup that matches closely your production setup, otherwise results will never be completely conclusive unless you're trying to optimize a small piece and it gets flattened into noise on top of the overall picture. Significant optimizations are always difficult because they cut through lots of dimensions and limitations that the older system over fit into or started hitting them, and those limitations usually these days go all the way into how concurrent systems work which influences everything else that the program might be doing. Saying it as some one who fights 1ms network latencies and L3 caches behaviors
I worry that this just adds complexity to most projects. The example in the readme is a Python function find_duplicates and poses to rewrite an implementation of Levenshtein in Rust. How do I know it's not faster than just switching to maintained software like RapidFuzz? Why would a maintainer want a dependency they can't understand in the hot path of their project?
In the app you could refactor the slow code, or optimise the run the time without introducing Rust.
You could run an optimised micro service.
Finally it is most likely to be an issue with database transactions which can be solved with better queries, indexes, separate read/write, caching, batching, and so many other techniques to avoid non critical blocking.
This is a big reason why I miss Objective-C. It was fast compiling, strongly typed, small binary size, decent debugger, good multithreading with GCD, a fully dynamic runtime, let you seamlessly drop to C++ for that 5% of code runtime boost if you needed it, a well designed batteries included standard library set in the iOS days it was prime in and on average a runtime speed that was between Java and C / C++ if you didn't bother to optimize that 5%.
It had some warts, but IMO was far more easy to solve than doing something like the swift project. In hindsight apple should've invested into Rust and continued to improve Objective-C as an applications programming language.
anttiharju | 12 hours ago
I recently discovered that one can apparently distribute Rust projects on npm by compiling to wasm. action-validator used to do this. Had been thinking about something like this.
combobyte | 12 hours ago
himata4113 | 11 hours ago
diegocg | 12 hours ago
tripledry | 11 hours ago
FartyMcFarter | 11 hours ago
Imagine being able to use only 1% of the machines you used to require, by migrating away from Python. This is very realistic for companies doing heavy computational work.
cadamsdotcom | 10 hours ago
FartyMcFarter | 10 hours ago
I'm not denying that domains exist where being I/O bound is a thing. For those cases Python can be a fine choice.
cadamsdotcom | 9 hours ago
For cpu bound stuff the language makes potentially an enormous difference; but then you get to trade off: eg. if you're not gonna need a fast language you are free to choose based on other considerations.
Might still both pick the same language though ;)
pessimizer | 9 hours ago
I'd make the case that everything on a computer is CPU bound depending on scale, even your crud app. Half the time when somebody is saying that X is I/O bound, they actually mean that it's bound by the performance of their database - which wisely, in the real world, is not written in python.
edit: and, of course, things in python that would run terribly slow if written in python become primitives, which are written in C. Python is a C program.
pdhborges | 8 hours ago
rhdunn | 9 hours ago
As with anything performance related you need to profile the code with realistic data/workflows and identify the parts that are slow.
Typically, doing things like changing algorithms, data structures, careful use of caching, reusing calculations, etc. are more important to performance than the choice of language.
fiedzia | 4 hours ago
The choice of language determines the extent to which those things are possible. In case of Python using C libraries sometimes means that you pull data from somewhere, hold them in Python memory in very inefficient way, pay for transformation to another form that C library uses and then do the same in reverse at the end. Perhaps even more times if C doesn't handle everything. "Use C libraries" often works, but is not universal solution.
rhdunn | 2 hours ago
For example, PyTorch (and numpy IIUC) store matrices/tensors as a 1D array of numbers. This is more memory efficient as all the data is colocated.
They use a technique to store the distance within the array to move when moving along each axis (strides). This allows for operations such as transpose to be swapping the array and stride values instead of performing an expensive array/vector copy.
Another example: using string formatter or join instead of separate concatenations allows the compiler/language to compute the size of the resulting string up front (if the language/library supports that) rather than allocating on demand.
Another example: using a hash map/set instead of an array to check for the presence of strings.
andyferris | 10 hours ago
(For big data you can use Python to drive some native code frameworks - it is good at that, for tiny data it’s irrelevant because there’s not much to do, but the moderate case gets awkward).
chrismorgan | 10 hours ago
In mid-2013, NewsBlur described in some detail their deployment and statistics. Python/Django, 48 servers. I confidently calculated that, with implementation efficient, one would be sufficient, though with little headroom, and further vertical scaling might have started running into I/O limitations. (I doubt a single server would be possible any more.)
It’s popular to scale horizontally far earlier than you actually need to. And if you can commit to sticking with vertical scaling (single big machine), you can simplify (and further speed up) things enormously.
I don’t know about now, but five years ago HN ran on a single server <https://news.ycombinator.com/item?id=28479595>, though with a standby machine also present since 2017ish.
kamma4434 | 5 hours ago
chrismorgan | 4 hours ago
Personally I think it’s a very good trade-off for vastly more businesses and services than actually practice it.
I suspect I may have seen more systems run into availability problems from unnecessarily distributed architectures than from hardware failure, and I’ve definitely seen costlier development due to it.
austin-cheney | 8 hours ago
In all fairness 6,000,000 messages per second across a single socket is likely an unrealistic scenario but application stability over multiple months pushing out message traffic across many sockets from many servers under a single application process is a realistic concern as is number of simultaneous open sockets.
fiedzia | 8 hours ago
afavour | 8 hours ago
The only JS-native answer is to use typed arrays, which is using a sledgehammer to crack a nut.
IshKebab | 7 hours ago
I've seen this at almost every company I've worked at.
xtracto | 7 hours ago
Thing is, the TS app weighted around 4GB overall and took 2s to do its thing. [A backend process, an http api and a static website generator].
I needed to decrease the size and increase performance dramatically,to be able to put it in a 2GB 2vcpu instance, which costs $12 monthly. Otherwise it would eat the profit.
Claude ported it to Rust, in around 2 days total. And it went down to 1.5Gb max, and 1/10 of the CPU usage. Now it sits in the aws europe zone making money.
embedding-shape | 4 hours ago
xtracto | 10 minutes ago
Apparently a lot of the node baggage was due to Garbage Collection, which Rust doesn't need. Also, immediately transforming incoming JSON to binary data helped.
Yes, to both: claude wrote the initial architecture, under my guidance. As I mentioned it was a PoC, so the first pass was "quick and dirty". Shit the original web server was React [which i didn't count for the comparison because barebones node can serve static pages as well.
It has been a cool experiment which started as a crazy idea, but now as I said gives me some spare change. I just SSH tunnel every day or two and load the web page to see how things are going.
owebmaster | 3 hours ago
the8472 | 6 hours ago
And python being interpreted and dogslow means any heavy computation you write in pure python needs to be offloaded too instead of just putting it on a threadpool, again making your architecture more complicated.
Add in serverless functions, which need startup, and now something that should have taken microseconds will take seconds.
Node is JITed at least, but still no shared-memory multithreading, so it still encourages all the architectural bloat.
graemep | an hour ago
Depends what you are doing. Not a problem for something like a CRUD web app. Not a problem for most desktop apps.
> heavy computation you write in pure python
Why would you write heavy computation in pure Python?
asdff | an hour ago
perdy | 11 hours ago
krmmalik | 8 hours ago
perdy | 6 hours ago
afdbcreid | 11 hours ago
stavros | 7 hours ago
hendler | 11 hours ago
Jnr | 3 hours ago
egorfine | 11 hours ago
While Rust is awesome, a lot of times the only apparent reason to chose Rust over C is virtue signaling.
Update: like I said, Rust is awesome and has so many advantages over C it's not worth a discussion really. But again I see that many projects are choosing Rust not because of merits but simply because it's a fashion.
jstanley | 11 hours ago
jph | 10 hours ago
Rust checked arithmetic is built into Rust's standard library (std) via explicit methods on primitive integer types (such as checked_add, checked_sub, checked_mul, and checked_div), which return Option<T> and evaluate to None on overflow. There's a known tradeoff of some speed, which is fine for my purposes because I need reliability more than raw speed.
I'm longtime C coder so I know how to do this in C. Rust strong types and static analysis make it so much easier to do correctly.
Conscat | 10 hours ago
uecker | 5 hours ago
https://uecker.codeberg.page/2026-10-24.html
IceDane | 10 hours ago
That seems like an extremely dubious claim.
Rust is just a lot more pleasant to work with in every possible way. C has the abstractive capabilities of a deaf-blind toddler.
uecker | 5 hours ago
preg_match | an hour ago
Even very basic abstractions possible in basically every language, like say a type that holds JSON text, is not possible in C.
uecker | an hour ago
Update: In fact, you can also build quite reliable abstractions around incomplete structure types. Those abstractions are better than what C++ adds, where the abstractions in the header are all very fragile.
booi | 10 hours ago
eterm | 10 hours ago
If you'd said another memory safe language I might have been on board, but C? We've seen a complete collapse in the ability of software to go un-hacked and un-exploited. Not all of that is down to poor memory safety of course, but it's a category of vulnerability that is massively increased in both surface and risk by choosing to write C.
Choosing Rust alone might be virtue signalling, but choosing a memory safe language is just pragmatic.
tialaramex | 9 hours ago
So magically the Rust was just as fast, but much more readable and when a junior (or an LLM) modifies it slightly so that the output container is bigger it won't suddenly segfault due to that scary in-place conversion loop now being a bounds miss, the Rust won't attempt the in-place conversion now that it can't work.
curt15 | 9 hours ago
eterm | 8 hours ago
Firstly the obvious, LLMs aren't perfect yet, they still make mistakes.
But even if they could achieve safe C by asking them to "Write Safe C, Make no mistakes", there would still be a significant benefit to achieving safety by using Rust or a memory safe language.
LLMs work best when they have a combination of clear objective functions and guardrails. In this case, the compiler acts as a guardrail to keep it safe while trying to solve the problem that needs solving.
Having a compiler step prevents the LLM taking a "shortcut". Despite models improving, they will still take shortcuts, sometimes absurd ones, to meet some definition of a "job done".
The other massive benefit is cost and speed. Having an LLM analyze and reason about the safety is expensive and wasteful. Having this done at compile time is cheaper and quicker. The earlier in the feedback loop, the cheaper it will be.
Save your tokens for "real" work, not stuff you can check at compile time.
QuantumNomad_ | 10 hours ago
Quite the opposite. Outside of a couple of very specific kind of cases (for example working with microcontrollers not supported by Rust toolchain), there is no good reason to choose C when you could choose Rust.
Choosing C over Rust means throwing away the memory safety features that Rust gives you for free. And for what? There is just no upside to choosing C in the vast, vast majority of cases.
virtualritz | 10 hours ago
Rust protects you from a whole class of bugs (borrow checker) and lets you enforce almost as many invariants as you chose, through the type system.
LLM are just as bad as humans at enforcing/tracking ownership and invariants.
We maintain two code bases; one is TS and the other Rust.
Both are by now written foremost by agents (since August 2025, I'd say).
We had numerous non-(business)-logic bugs in the TS code base over this period.
Zero such bugs in Rust. Because the compiler catches them for us. All bugs we had in that code where actual logic bugs. I.e. the spec already had the bug or contained an oversight.
Zero.
We have since started rewriting the TS code base in Rust and will likely switch over in the next three months.
tialaramex | 6 hours ago
Seems like just virtue to me. The guy who volunteers every week to pick up garbage from the beach isn't virtue signalling, he's just virtuous. The guy who came once, with a film crew and left once they'd got the shots they wanted - that is virtue signalling. They're both shown in the film, but only one of them actually does the signalled virtuous activity when the cameras aren't rolling.
You could argue that RIIR was conducted as virtue signalling if what we saw was one of those translations smeared in unexplained unsafe blocks, with rats nest logic that no human is going to untangle. But that doesn't seem to be the case here.
tialaramex | 9 hours ago
searealist | 8 hours ago
Also, we have LLMs now. Rust should be the default for many things.
benjiro29 | 8 hours ago
Or C Or Go Or ... Its like people can not look past one language, to understand that with LLMs, a ton of languages gotten way more easy.
Personal experience that running a few subagents parallel with Rust, just slows everything down to a crawl, even wit ccache and a ton of other tweaks. As long as your codebase is a few 100k lines, Rust is ok. But start going in the 500k, 1 million... starting to get C++ flashbacks where your spending more time waiting on the compile jobs, that fight each other for resources then actual testing.
Until Rust can fix their slow and resource munching compiler, its been off the menu for me. Ended up having everything in C and the difference was very noticeable.
jghn | 7 hours ago
ThouYS | 8 hours ago
the true performance hog is like sand, spread across the system, a little bit in every place.
sham1 | 7 hours ago
Oh, and they can be annoying to refactor later on.
embedding-shape | 6 hours ago
kamma4434 | 5 hours ago
bartread | 2 hours ago
That and WinForms absolutely sucked compared to Swing. Layout options, tables/grids, and trees in particular were very poor in WinForms. Not to mention custom control development was far better in Swing than in WinForms. It was annoying because the one thing I’d expected to be better with .NET was the desktop UI framework.
kamma4434 | an hour ago
IshKebab | 7 hours ago
The number of use cases where you actually can move just a small part of the program to C++/Rust and that solves performance is actually really small. Basically highly numerical things like AI or SMT solving. Even supposedly IO bound things like Django tend to be quite slow in Python.
jodrellblank | 6 hours ago
Somewhere in your code is a little whammy where someone invalidated a bunch of tree nodes which took about 8 nanoseconds and caused the layout engine to now do tons of computation that it didn't have to do before. No profiler in the world is going to save you from this problem, it's going to tell you that the problem is in the layout code. Well duh, thanks for that, of course the compute is in the layout code, it's always in the layout code, all we do is layout and draw. So I have to find the 3 nanoseconds where somebody invalidated something that they have no business invalidating because it's wrong. And the way you fix that is [to have a sense of how to check that you're invalidating the right thing, regression testing, visualizations, logging, planning] and it could be literally 4 or 5 instructions dirtying the cache and that's not going to show up in a profile.
[paraphrasing; Casey: if you've developed the whole browser without caring about this, at the end you're going to find it very slow and not be able to squeeze any more performance out of the layout engine? Rico: Right, this is not something you can fix at the finish line, it needs a plan]"""
- Rico Mariani, interview: https://youtu.be/48Rig6v-xYU?t=3615
Veserv | an hour ago
novok | 36 minutes ago
tomp | 8 hours ago
Most often, Python is enough.
toxik | 7 hours ago
tomp | 6 hours ago
But if you can optimize C, most often you can also optimize Python.
I have a SLAM implementation in pure Python+Numba where all points/keyframes are kept in a single flat table, no allocation.
fiedzia | 7 hours ago
odiroot | 6 hours ago
simonask | 6 hours ago
Bolwin | 7 hours ago
And something tells me C# and Java could have gotten 90% of the improvement without any rewrite. I'll have to try later today.
stackskipton | 6 hours ago
raincole | 7 hours ago
zodwick | 7 hours ago
zodwick | 7 hours ago
Taking python as an example, one could use benefit of hindsight and make better decisions from the start ( offloading slow parts to C binaries, better DS decisions, eliminating bloat etc.. ) if they rewrite the same app in Python. This is kind of what happens when a program gets rewritten to another language ( Rust ) - better decisions are made from the start and less bloat is copied over.
Yes, obviously there are exceptions to this. But most of the time it is the choices we make that make the program slow and not the language itself.
It used to be that rewriting programs were almost always a dumb idea due to how much effort went into it - see: https://www.joelonsoftware.com/2000/04/06/things-you-should-... . But AI has made this argument less compelling imo. I now regularly rewrite big chunks of programs with various end goals given to the agent.
nicoburns | 7 hours ago
zodwick | 6 hours ago
pastel8739 | 3 hours ago
rapind | 6 hours ago
rafram | 6 hours ago
zodwick | 6 hours ago
dgacmu | 5 hours ago
jeffbee | 5 hours ago
dgacmu | 5 hours ago
Rust's async situation is still a pain in many ways.
But throwing Rayon at something often results in very reasonable parallel performance gains without cluttering things much. It usually won't get you to an optimal solution, but it's good for 80% with 10% of the pain.
jeffbee | 5 hours ago
toast0 | 2 hours ago
The performance oriented (data plane) work happens on dedicated, cpu-pinned threads and sockets outside the tokio runtime. The control plane work happens in tokio async. Interaction between the two is tricky. But decreased latency and increased throughput is valuable. And it's a complex server, so we can't really try too many approaches.
It certainly doesn't help that the data structures are, by necessity, a cephalopod that have to be used across threads.
cogman10 | an hour ago
Everything wants to push you down the path of using `ARC<Thing>` even when `Thing` is immutable or the lifetime can be mostly guaranteed.
Here's an example of that problem. Let's say I want to do 2 things concurrently against the same data set. I might want to write code that looks like this:
But that immediately gets you in hot water because "async block may outlive the current function, but it borrows `v`, which is owned by the current function"Now, you and I can clearly see that the async block does not, in fact, outlive the current function. However, AFAIK, there's no real way to convince rust that that is the case.
So now even though `v` is immutable, making this a thread safe operation, we need to introduce unnecessary concurrency constructs or break out unsafe in order to force the language to recognize that "Yes, you can trust me".
For rust to actually be fast with concurrent operations, it needs to be smarter about lifetimes in terms of async.
chowells | 3 hours ago
Joker_vD | 2 hours ago
rented_mule | 5 hours ago
The port was pretty direct, function for function. It was even line for line where language and library differences didn't offer an easier way. I was just trying to see if Python was so slow that we couldn't consider using it in production, and this was the most speed critical batch we had.
I assumed the speed difference was a bug that was skipping work, but that seemed unlikely because the output was correct. It turned out to be a bug in the C++ code that was needlessly reproducing work (an issue with cache keys). The bug was extremely subtle. When I fixed the C++, there was very little difference in speed as the batch was I/O bound when the cache was working.
So, adding to your point, sometimes you can greatly improve speed by rewriting in a slower language, even without performance in mind.
drfloyd51 | 5 hours ago
But also technically I think your point still stands. Because rewriting it helped you find a defect in the original. Which did improve performance of the original.
It’s quite interesting the two implementations performance was so close in the end. Do you consider one implementation “better” for non-performance reasons? Maybe one type of dev is easier to find. Or one language is easier to create and maintain correctly behaving programs in your environment?
rented_mule | 3 hours ago
Hiring devs who already knew Python was not really an option in 1997. But we quickly found that there was not much difference in time to ramp up a C++ developer on our C++ codebase vs. ramping up a developer on Python plus our Python codebase. It was just a matter of finding developers who were happy to learn a language they may or may not have heard of, but had likely never looked into.
asdff | an hour ago
brunoarueira | 4 hours ago
kleiba2 | 3 hours ago
WalterBright | 2 hours ago
One of the problems, for C, is the use of . to access a field via a variable, and -> to access a field via a pointer. To switch between a pointer and a variable in a struct means you've got to re-edit large quantities of code everywhere. The result is just too tedious.
This was the motivation in D for using . for both. It turns out, it is completely unnecessary for having both . and -> as the compiler semantic pass can trivially figure it out. Eliminating this issue makes for much easier redesign of a data structure.
everforward | 2 hours ago
My mind equates -> to "this could be NULL" without ever looking at the function signature.
It is way more of a pain in the ass for refactors than = vs := though.
tancop | an hour ago
For me that's definitely a bad thing. It's the reason I don't like Rust syntax, they make you write everything out even if there is no possible way to misinterpret the code. And they never do things like Zig enum variant shorthand because syntax sugar is evil. Maybe they're just diabetic.
metaltyphoon | an hour ago
yjftsjthsd-h | 2 hours ago
solyin | 7 hours ago
Kuyawa | 5 hours ago
"When in Rome, do as the Romans do"
Almondsetat | 7 hours ago
Doesn't seem a recipe for success
Dwedit | 6 hours ago
osigurdson | 5 hours ago
micahcc | 3 hours ago
osigurdson | 2 hours ago
https://github.com/osigurdson/mib
vkaku | 5 hours ago
Rust itself had an understandability issue until LLMs came along and started speedrunning parts of the Rust development process, so this argument is language AND time immaterial.
adsharma | 5 hours ago
Py2many is an implementation of these concepts.
ezbie | 5 hours ago
Developers rewrite code in rust for memory safety, not speed.
1970-01-01 | 2 hours ago
IshKebab | 2 hours ago
* Memory safety
* Performance
* Logical correctness
People definitely rewrite in Rust for speed. To be honest I would say memory safety has been overegged as an advantage - yes obviously you want memory safety, but I think some people think it's the only advantage Rust has, when logical correctness (due to the stronger type system) is definitely in the same league.
jeremyjh | an hour ago
caymanjim | 53 minutes ago
iagiagiag | 32 minutes ago
But in many cases a rust version already exists (like for tokenization etc.). I wouldn't advise to write it yourself if a supported repo is already doing it.
efficax | 5 hours ago
fukaiall | 4 hours ago
alexfromapex | 4 hours ago
the_arun | 4 hours ago
TheRealPomax | 2 hours ago
Then absolutely rewrite it so that it uses Tauri instead. Which takes your executable from 300MB to about 5MB for something that actually does something meaningful.
It's certainly still "replace the slow (but really, inefficient, not just slow) parts", but instead of 5% it's 98%.
zamalek | an hour ago
Verdex | an hour ago
Rust here was mostly because they wanted to link to it. It has some benefits by itself, but the real killer feature was the e2e tests that they had for the effort.
buryat | an hour ago
dejaydev | 48 minutes ago
dalemhurley | 41 minutes ago
In the app you could refactor the slow code, or optimise the run the time without introducing Rust.
You could run an optimised micro service.
Finally it is most likely to be an issue with database transactions which can be solved with better queries, indexes, separate read/write, caching, batching, and so many other techniques to avoid non critical blocking.
novok | 40 minutes ago
It had some warts, but IMO was far more easy to solve than doing something like the swift project. In hindsight apple should've invested into Rust and continued to improve Objective-C as an applications programming language.