Go has net/http in the stdlib It’s a lot easier to read Go versus Rust code Ultimately it depends on what you’re building, Rust has its place and so does Go. Answer from jasonmccallister on reddit.com
🌐
JetBrains
blog.jetbrains.com › rust › 2025 › 06 › 12 › rust-vs-go
Rust vs Go: Which One to Choose in 2025 | The RustRover Blog
February 17, 2026 - The core philosophy behind Rust is to provide memory safety without using garbage collection and to support concurrency without data races. It achieves these through ‘ownership’ and ‘borrowing’ concepts, which are enforced at compile-time by the Rust compiler.
🌐
vpoltora
poltora.dev › rust-vs-go-memory
Rust vs Go: Memory Management - vpoltora
November 12, 2025 - The escape analyzer will decide that since the value is returned by a pointer, the memory region must live after the function ends, so it will place u on the heap. In summary, in Go, the compiler decides where variables will be stored by analyzing the code. In Rust, the compiler does not perform escape analysis and does not decide where to store data - the developer does.
🌐
Reddit
reddit.com › r/golang › go vs rust performance test: 30% faster exec time, while 60 times more ram usage!
r/golang on Reddit: Go vs Rust performance test: 30% faster exec time, while 60 times more RAM usage!
April 6, 2025 -

The test: https://github.com/curvednebula/perf-tests

So in the test we run 100'000 parallel tasks, in each task 10'000 small structs created, inserted into a map, and after that retrieved from the map by the key.

Go (goroutines):

  • finished in 46.32s, one task avg 23.59s, min 0.02s, max 46.32s

  • RAM: 1.5Gb - 4Gb

Rust (tokio tasks):

  • finished in 67.85s, one task avg 33.237s, min 0.007s, max 67.854s

  • RAM: 35Mb - 60Mb

[UPDATE]: After limiting number of goroutines running simultaneously to number of CPU threads, RAM usage decreased from 4Gb to 36Mb. Rust's tokio tasks handle the test gracefully out of the box - no optimization required - only mimalloc to reduce execution time was added.

First, I'm not an expert in those two languages. I'm evaluating them for my project. So my implementation is most likely not the most efficient one. While that's true for both Go and Rust, and I was impressed that Go could finish the task 33% faster. But the RAM usage...

I understand that golang's GC just can't keep up with 100'000 goroutines that keep allocating new structs. This explains huge memory usage compared to Rust.

Since I prefer Go's simplicity - I wanted to make it work. So I created another test in Go (func testWithPool(...)) - where instead of creating new structs every time, I'm using pool. So I return structs back to the pool when a goroutine finishes. Now goroutines could reuse structs from the pool instead of creating new ones. In this case GC doesn't need to do much at all. While this made things even worse and RAM usage went up to the max RAM available.

I'm wondering if Go's implementation could be improved so we could keep RAM usage under control.

-----------------

[UPDATE] After more testing and implementing some ideas from the comments, I came to the following conclusion:

Rust was 30% slower with the default malloc, but almost identical to Go with mimalloc. While the biggest difference was massive RAM usage by Go: 2-4Gb vs Rust only 30-60Mb. But why? Is that simply because GC can't keep up with so many goroutines allocating structs?

Notice that on average Rust finished a task in 0.006s (max in 0.053s), while Go's average task duration was 16s! A massive differrence! If both finished all tasks at roughtly the same time that could only mean that Go is execute thousands of tasks in parallel sharing limited amount of CPU threads available, but Rust is running only couple of them at once. This explains why Rust's average task duration is so short.

Since Go runs so many tasks in paralell it keeps thousands of hash maps filled with thousands of structs in the RAM. GC can't even free this memory because application is still using it. Rust on the other hand only creates couple of hash maps at once.

So to solve the problem I've created a simple utility: CPU workers. It limits number of parallel tasks executed to be not more than the number of CPU threads. With this optimization Go's memory usage dropped to 1000Mb at start and it drops down to 200Mb as test runs. This is at least 4 times better than before. And probably the initial burst is just the result of GC warming up.

[FINAL-UPDATE]: After limiting number of goroutines running simultaneously to number of CPU threads, RAM usage decreased from 4Gb to 36Mb. Rust's tokio tasks handle this test gracefully out of the box - no optimization required - only mimalloc to reduce execution time was added. But Go optimization was very simple, so I wouldn't call it a problem. Overall I'm impressed with Go's performance.

🌐
GitHub
github.com › hiroaki-yamamoto › go-vs-rust
GitHub - hiroaki-yamamoto/go-vs-rust: Performance Comparison Between Go and Rust · GitHub
July 12, 2020 - While Golang can handle concurrency very well, Rust can reduce memory overheads by using Zero-Cost Abstraction. In addition, rust has "release" mode to optimize the app for releasing.
Starred by 4 users
Forked by 2 users
Languages   Go 60.0% | Rust 40.0%
🌐
Reddit
reddit.com › r/golang › why do you prefer go over rust ?
r/golang on Reddit: Why do you prefer Go over Rust ?
January 8, 2022 -

Please don’t say too simple answers like « I prefer it’s libraries » « it’s easier » or « it’s enough for me ».

Rust is regarded as a faster and safer language at the cost of productivity / complexity. Is it just that ?

Do you think Go is more a Java/python replacement or can be optimized as well to run very fast (close to Rust/C) ? Maybe is it as fast in I/O which would be the bottleneck in most scenarios ?

I’m doing my first Go program (for GCP) but I’m interested in Rust as well and I’d like pretty detailed opinions from both sides 🙂

(It can ofc be very well « it’s enough for me » btw, everyone has preferences but then some answers could just be a bit pointless if you see what I mean). I’m sure it’s a « yet another go vs rust » question and I apologize 😆

🌐
DEV Community
dev.to › thatcoolguy › rust-vs-go-which-should-you-choose-in-2024-50k5
Rust vs Go? Which Should You Learn in 2026 - DEV Community
2 days ago - In this section, you'll learn how Rust and Go compare in terms of speed and memory usage.
🌐
Pkolaczk
pkolaczk.github.io › memory-consumption-of-async
How Much Memory Do You Need to Run 1 Million Concurrent Tasks? | Piotr Kołaczkowski
May 21, 2023 - Let’s start from something small. Because some runtimes require some memory for themselves, let’s first launch only one task. ... We can see there are certainly two groups of programs. Go and Rust programs, compiled statically to native binaries, need very little memory.
Find elsewhere
🌐
Medium
medium.com › @shyamsundarb › c-vs-rust-vs-go-a-performance-benchmarking-in-kubernetes-c303b67b84b5
C# vs Rust vs Go. A performance benchmarking in Kubernetes | by B Shyam Sundar | Medium
February 19, 2023 - The edited repository link for this article can be found shyamsundarb-arch/rustvcsvgo (github.com). Please watch Anton’s video for explanation on Helm charts and other deployment objects. The changes I made were: ... Created a C# Web API project with 2 endpoints along with required docker files. ... To ensure that our APIs are running efficiently, we will use performance monitoring tools to monitor their resource usage. These tools will provide us with information on the CPU and memory usage of our APIs, as well as any other performance-related metrics that we need to track.
🌐
GitHub
github.com › linode › docs › blob › develop › docs › guides › development › go › golang-vs-rust › index.md
docs/docs/guides/development/go/golang-vs-rust/index.md at develop · linode/docs
Not only does this keep Rust memory safe, it does so without the substantial performance impacts usually incurred by garbage collection. Like Go, Rust also comes with built-in support for concurrency. While its concurrency model is more complicated, it is able to maintain Rust's high performance while still guaranteeing safety in concurrent operations. How do Rust and Go stack up when it comes to features and usage?
Author   linode
🌐
Medium
medium.com › @ca.purshottam96 › go-vs-rust-memory-management-the-map-that-cost-us-500-month-539b4b8ae207
Go vs Rust Memory Management: The Map That Cost Us $500/Month 💸 | by Purshottam Aggarwal | Medium
July 3, 2025 - Go vs Rust Memory Management: The Map That Cost Us $500/Month 💸 The 3 AM Server Meltdown 🔥 So picture this — it’s 3 AM, your production servers are basically eating memory like there’s no …
🌐
Bitfield Consulting
bitfieldconsulting.com › posts › rust-vs-go
Rust vs Go — Bitfield Consulting
February 15, 2026 - Performance. Rust’s clever compiler produces optimised code that runs as fast as the underlying hardware will allow, equalling the performance of C++ or assembly language programs without sacrificing memory safety.
🌐
Insanitybit
insanitybit.github.io › 2016 › 12 › 28 › golang-and-rustlang-memory-safety
Golang and Rustlang Memory Safety - InsanityBit
This defense in depth attitude is, in my opinion, exactly the right way to go. Rust programs don’t have to rely entirely on the memory safety guarantees of the language, which is critical since rust allows explicitly unsafe code, FFI, etc.
🌐
Hacker News
news.ycombinator.com › item
Taming Go’s memory usage, or how we avoided rewriting our client in Rust | Hacker News
September 24, 2021 - This is a great article. But none of these seem Go-specific†, or even GC-specific. They're doing something really ambitious (slurping packets up off the wire against busy API servers, reassembling them in userland into streams, and then parsing the contents of the streams).
🌐
Reddit
reddit.com › r/golang › go vs rust: i was wrong about performance
r/golang on Reddit: Go vs Rust: I Was WRONG About Performance
February 4, 2026 -

I benchmarked identical Go and Rust servers under heavy load:

- 15,000 concurrent users

- 15 minutes sustained load

- Real Hetzner K3s cluster (not localhost)

- Separate nodes for apps, monitoring, and load testing

- k6 for load generation, Prometheus + Grafana for metrics

Both servers do the same thing: 100 iterations of SHA256 hashing, return JSON.

Go: standard library only

Rust: Hyper + Tokio + sha2

I tracked p50, p90, p95, p99 latencies in real-time.

The results were not what I expected.

Code is on GitHub if you want to run it yourself: https://github.com/huseyinbabal/benchmarks/tree/main/rust-server-vs-goserver

Curious what you all think.

🌐
PullFlow
pullflow.com › blog › go-vs-python-vs-rust-complete-performance-comparison
Go vs Python vs Rust: Which One Should You Learn in 2025? Benchmarks, Jobs & Trade‑offs
Rust → Minimal footprint thanks to ownership and zero-cost abstractions (you get high-level features like iterators or traits without any extra runtime cost compared to low-level code). Go → Uses garbage collection but keeps pause times low (<10 ms in most real workloads). Python → Has a larger memory overhead (hundreds of MB for data-heavy scripts), though tools like Cython, Codon, or PyPy can cut usage significantly (Arxiv).
🌐
LogRocket
blog.logrocket.com › home › go vs. rust: when to use rust and when to use go
Go vs. Rust: When to use Rust and when to use Go - LogRocket Blog
December 3, 2024 - Rust doesn’t have garbage collection; the way it handles memory management means that, unlike Go, it doesn’t need a garbage collector, and references let objects easily get passed around without requiring copies to be made. Individual benchmarks can be game-able and tricky to interpret. To address this, the Benchmarks Game allows for multiple programs for each language, comparing each language’s runtime, memory usage, and code complexity to get a better sense of what the tradeoffs are between them.
🌐
Medium
medium.com › @dexwritescode › comparison-between-java-go-and-rust-fdb21bd5fb7c
Comparison between Java, Go, and Rust | by Dex | Medium
July 2, 2023 - Where are the bars for Go and Rust versions that show the memory footprint while running idle? Well, they are there, only that Java consumes an upward of 160 MB when the JVM starts the program and sitting idle, doing nothing.