I'd say that the Rust community is more active on social media but there are more C and C++ programmers out there having jobs. None of my colleagues who work in the Automotive industry writing mostly plain C have ever bragged about it on social media other than LinkedIn. Answer from mm007emko on reddit.com
🌐
Reddit
reddit.com › r/cprogramming › why rust and not c?
r/cprogramming on Reddit: Why Rust and not C?
December 4, 2024 -

I have been researching about Rust and it just made me curious, Rust has:

  • Pretty hard syntax.

  • Low level langauge.

  • Slowest compile time.

And yet, Rust has:

  • A huge community.

  • A lot of frameworks.

  • Widely being used in creating new techs such as Deno or Datex (by u/jonasstrehle, unyt.org).

Now if I'm not wrong, C has almost the same level of difficulty, but is faster and yet I don't see a large community of frameworks for web dev, app dev, game dev, blockchain etc.

Why is that? And before any Rustaceans, roast me, I'm new and just trying to reason guys.

To me it just seems, that any capabilities that Rust has as a programming language, C has them and the missing part is community.

Also, C++ has more support then C does, what is this? (And before anyone says anything, yes I'll post this question on subreddit for Rust as well, don't worry, just taking opinions from everywhere)

Lastly, do you think if C gets some cool frameworks it may fly high?

Top answer
1 of 48
90
I'd say that the Rust community is more active on social media but there are more C and C++ programmers out there having jobs. None of my colleagues who work in the Automotive industry writing mostly plain C have ever bragged about it on social media other than LinkedIn.
2 of 48
49
Hi! I’m a game developer, I’ll weigh In here from my perspective.  C is what we use for most of our stuff, we use C because it’s so simple we can actually generate it from other programming  languages that we create internal to our company. We rely on our company culture to control software quality, not the compiler. This has drawbacks, namely that hiring people is hard, and there’s a lot of things in the code base that you have to “just know how to do” but by offloading the task of writing good code on our brains, we free up compile and run time! It also has easy Interop with Windows OS constructs, solid documentation in Linux MAN pages etc. And of course it’s fast! The speed comes from its simplicity though. With Rust and C++’s abstractions come often unacceptable performance penalties, or hoop jumping that prevents us from creating the API’s we want (things like smart pointers). The solutions that Rust and C++ make for safety solve the general case, which is much harder than solving e.g memory safety for the specific application you’re creating, and so they end up being larger, more cumbersome, and often slower. we actually avoid frameworks most of the time, the reason is much the same for us avoiding Rust and C++, the frameworks are generally not doing exactly what we need them to do, or very often not as fast as we need them to do it. When we do rely on frameworks e.g audio packages, font renderers etc, we are very careful about how we use them. In summary: C doesn’t have a ton of packages and such because (in my experience) people using C don’t want them anyway. They want the shortest path to a solution, which comes with its own problems, but works well for game studios.
🌐
Kornel
kornel.ski › rust-c-speed
Speed of Rust vs C
But in practice C has fewer abstractions, primitive standard library, dreadful dependency situation, and I just don't have the time to reinvent the wheel, optimally, every time. Both Rust and C give control over the layout of data structures, integer sizes, stack vs heap memory allocation, pointer indirections, and generally translate to understandable machine code with little "magic" inserted by the compiler.
🌐
DEV Community
dev.to › sucuturdean › is-modern-c-better-then-rust-3odf
Is modern C better then Rust? - DEV Community
April 16, 2022 - There was an article that said that you have to explicitly destroy every object(I mean even the integers allocated on the stack) in C, no wonder everyone thinks C is unsafe. And there is the whole thing with using Rust in the Linux kernel which seems questionable if you ask me.
🌐
Reddit
reddit.com › r/rust › why isn't rust faster than c? (given it can leverage more explicit information at compile time)
r/rust on Reddit: Why ISN'T Rust faster than C? (given it can leverage more explicit information at compile time)
February 17, 2024 -

I know a lot of people go back and fourth about "Why is Rust faster than C" when it's really not, it's basically the same (in general use) but I've seen far less about why Rust isn't faster than C.

I remember a lot of times where people would create (accidentally or intentionally for the purposes of demonstration) microbenchmarks where something like Javascript would actually be able to outperform C because the JIT was able to identify patterns in the execution and over-optimize compared to what the C compiler could do. While this is a great illustration of the flaws with micro-benchmarking since we all generally understand that, no, Javascript is not actually faster than C, (*in basically any real-world usecase) but it's been stuck in my head because Rust should have that sort of information too.

Some information will only ever be known at runtime, such as exact usage/call patterns and whatnot, but if we're speaking in generalities then the Rust compiler should have far more information about how it can optimize than the C compiler ever did, so why isn't that manifesting in an overall speed increase? (again, this is speaking in general, real-world usage, not exact cases) I know there are some cases where this information is leveraged, for instance I remember someone mentioning using a non-zero type would let the compiler know it didn't have to check to prevent a division-by-zero error, but by and large Rust seems more or less directly comparable to C. (maybe low-single digit % slower)

Do the extra safety checks just tend to cancel-out with the performance-gains from extra optimization information? Is it a limitation with using LLVM compilation? (for instance, I've heard people mention that GCC-compiled-C is actually marginally faster than Clang-compiled-C) Or is it just that it's already fast enough and it's not worth the effort to add these performance boosts since their yield is lower than the effort it'd take to develop them? (not to mention if they present issues for long-term maintenance)

To be clear, this isn't a critique, it's a curiosity. Rust is already basically as fast as C and C is basically the diamond-standard in terms of performance. I'm not saying that it's a problem that Rust isn't faster than C, I'm just asking why that is the case. My question is purely about why the explicivity of Rust isn't able to be leveraged for generally faster performance on a broad-stroke technical level. E.g. : "Why is javascript slower than C" -> "It's an extremely high level interpreted language whereas C compiles to straight machine code", "well actu-" shut. This is an actualless question. Sometimes Javascript is faster than C and if you put a pig in a plane it can fall with style, technical "well actually"s just muddy the conversation. So, speaking in broad-strokes and out of purely technical curiosity, why isn't Rust faster than C?

Top answer
1 of 33
535
and C is basically the diamond-standard in terms of performance. First I'll note that all mainstream AOT compilers -- Visual C++, LLVM, ICC, GCC -- have been optimizing C performance for decades. It's a bit similar to how "JavaScript" is so fast: it's a terrible language to optimize with, but being the de-facto standard on the web, decades of manpower have been poured into V8, SpiderMonkey, etc... Secondly, I'll note that contemporary CPUs have been optimized for C. With C being the reference benchmark for performance, CPU makers are incentivized to demonstrate that their CPU runs those C programs with good performance. That's how you end-up with sets of instructions dedicated to NUL-terminated strings in x86/x64. As such, I wouldn't say necessarily that C is "best of the best" -- Fortran would like a world -- and more than the last 60 years have seen the world converging on eking out as much performance out of C as possible. There are still places where C code-generation is not ideal, however. In the absence of sum-types -- tagged unions are not first-class -- there's no calling convention I know of for C which optimizes the passing of sum-types. Passing the discriminant in flags, and splitting the variants between pass-by-value in register or pass-by-pointer (to the stack) would improve performance. But it's not done. why Rust isn't faster than C. Which Rust? Idiomatic Rust is faster than idiomatic C. Just check slice::sort_unsable vs qsort: monomorphization works wonders. So in this sense, Rust is faster than C. When push comes to shove, however, Rust allows dropping to unsafe, C allows annotating with restrict, and both allow dropping down to assembly -- at this point, it's unsurprising that the same performance can be eked out of both. Still, even then, Rust code typically remains more maintainable: it's easier to change without introducing UB by accident, because the compiler checks more invariants. But maintainable doesn't win benchmarks, so it's mostly ignored in the performance discussion.
2 of 33
68
Rust has the potential to produce more optimized machine code because of the mutation XOR sharing rule, but I don't think the LLVM optimizer takes advantage of that yet (?). On the other hand things like index out bounds checking in loops can sometimes (not always) incur a small runtime penalty (about 3% I think).
🌐
Reddit
reddit.com › r/rust › when is c better a better choice than rust?
r/rust on Reddit: When is C better a better choice than Rust?
January 11, 2023 -

Hello all, I’m putting this question in this thread purposely because I really want to hear from experienced Rust programmers (whether they be professional or unpaid proficient users of Rust) when they think C is actually a better language choice for a given project.

Based on your experience with Rust, what project types would you still elect to write in C?

Talking purely about performance, not development or compile time.

Also, I understand they would be lower level projects, but I am more curious about actual specific things you would build in C over Rust.

🌐
JetBrains
blog.jetbrains.com › rust › 2025 › 12 › 16 › rust-vs-cpp-comparison-for-2026
Rust VS C++ Comparison for 2026 | The RustRover Blog
February 17, 2026 - TLDR: C++ and Rust are both high-performance systems programming languages with different strengths. C++ is mature and flexible, offering low-level control and a vast ecosystem, while Rust emphasizes memory safety, concurrency, and modern tooling.
Find elsewhere
🌐
Reddit
reddit.com › r/c_programming › why rust and not c?
r/C_Programming on Reddit: Why Rust and not C?
December 4, 2024 -

I have been researching about Rust and it just made me curious, Rust has:

  • Pretty hard syntax.

  • Low level langauge.

  • Slowest compile time.

And yet, Rust has:

  • A huge community.

  • A lot of frameworks.

  • Widely being used in creating new techs such as Deno or Datex (by u/jonasstrehle, unyt.org).

Now if I'm not wrong, C has almost the same level of difficulty, but is faster and yet I don't see a large community of frameworks for web dev, app dev, game dev, blockchain etc.

Why is that? And before any Rustaceans, roast me, I'm new and just trying to reason guys.

To me it just seems, that any capabilities that Rust has as a programming language, C has them and the missing part is community.

Also, C++ has more support then C does, what is this? (And before anyone says anything, yes I'll post this question on subreddit for Rust as well, don't worry, just taking opinions from everywhere)

Lastly, do you think if C gets some cool frameworks it may fly high?

🌐
Medium
medium.com › solo-devs › rust-vs-c-in-2025-the-real-talk-every-developer-needs-to-hear-8d21e614c72f
🦀 Rust vs C in 2025: The Real Talk Every Developer Needs to Hear
July 25, 2025 - If you’ve been scrolling through tech Twitter (sorry, X 🙄) and feeling overwhelmed by the Rust evangelists screaming “REWRITE EVERYTHING IN RUST! 🔥” while the C veterans are grumbling “Kids these days don’t understand REAL programming 👴”, then this article is for you.
🌐
Towards Data Science
towardsdatascience.com › home › latest › measuring the execution times of c versus rust
Measuring The Execution Times of C Versus Rust | Towards Data Science
February 3, 2025 - With this freedom can come potential issues such as buffer overflows, null pointer dereferencing, and memory leaks if the programmer does not handle these properly in their code. It lacks built-in safety features to prevent these, and the user has to make them manually. Rust is the polar opposite of this and it emphasizes memory safety while trying to sacrifice as little performance as possible.
🌐
Drew DeVault's blog
drewdevault.com › 2019 › 03 › 25 › Rust-is-not-a-good-C-replacement.html
Rust is not a good C replacement
The values of good C++ programmers are incompatible with the values of good C programmers1. Rust is a decent C++ replacement if you have the same goals as C++, but if you don’t, the design has very similar drawbacks. Both Rust and C++ are what I like to call “kitchen sink” programming languages, with the obvious implication.
🌐
Stack Overflow
stackoverflow.com › beta › discussions › 78239270 › rust-vs-c-c-is-rust-better-than-c-c-or-is-a-skill-issue
Rust vs C/C++: is Rust better than C/C++ or is a "skill issue"? - Stack Overflow
March 28, 2024 - I delved deeper into both languages. It's undeniable that manual memory management in C/C++ can lead to security vulnerabilities like buffer overflows due to poorly written code. On the other hand, regarding Rust, some claim it's written in itself (similar to other low-level languages).
Top answer
1 of 6
73

You seem to have quite a bit of misconceptions, which I'll address alongside your question. If anything is still unclear, please feel free to comment on this answer so I can address it

Safer

Yes, Rust is safer.

Safety is one of Rust raison d'être, after all. Specifically, outside of unsafe blocks, Rust is memory safe and type safe, that is:

  • Memory safe: it is not possible to access memory that has not been allocated, or has already been deallocated.
  • Type safe: it is not possible to interpret a memory as if it held the value of a given type, while it actually holds the value of another.

Furthermore, a number of operations that would be Undefined Behavior in C or C++ have well defined semantics in Rust instead, such as signed integer overflows.

Memory Safety -- which underpins Type Safety -- is generally further split into two categories:

  • Spatial Safety: the inability to access out of bounds.
  • Temporal Safety: the inability to access before allocation/after deallocation.

Rust achieves Temporal Safety by compile-time checks. This does mean a bit more code in the compiler1, but there's no run-time footprint -- whether memory or instructions -- so it's "free" at run-time.

Rust achieves Spatial Safety with a combination of library-provided abstractions, and run-time checks. For example, iteration in Rust is achieved by for x in collection. For an array this boils down to pointer increment -- just like in C or C++, so no run-time overhead -- except that since the user doesn't manipulate the pointers directly, it's safe.

Apart from that, there are various run-time checks: bounds-checks for index access2, null-checks for Option, etc... those may or may not be optimized, and thus may lead to a slight run-time overhead. The "trick" of Rust, however, is that if performance really matters (as profiled) and the optimizer is not managing to optimize well-enough, it's always possible to try and massage the code (front-loading a bounds-check, for example) or in the worst case to delve down to unsafe Rust, and thus achieve the required performance target with only localized "Here Be Dragons" code.

1 Rust compile times are on-par with C++, hence quite slower than C, but the safety checks (borrow checks) are an insignificant part of that. Extensive use of generics, traits, and type-inference make the language much more difficult to compile, and the compilation model (full crate at a time) makes parallelization trickier. Still, work is in progress to parallelize the rustc front-end, which should bring compile times down substantially from 2024 onwards.

2 Rust does NOT check indexes at compile-time in general but checks them at run-time instead. A branch itself is typically not a problem at CPU level, if well-predicted. The real impact of bounds-checks is that unless optimized out, they prevent auto-vectorization and a number of other optimizations. This is why front-loading a bounds-check (before the loop) can be so effective performance-wise: it may unlock all those optimizations.

Faster

Idiomatic Rust is likely faster.

First of all, in a "pedal to the metal" situation, all 3 languages can achieve the same performance. Heck, all 3 languages allow embedding assembly, if it comes to that.

So, what we are really asking, is whether idiomatic (not pessimized, not maximally optimized) code may be faster in one language or another, and in those conditions Rust has a certain number of advantages.

The first and foremost advantage of Rust is one of culture. The Rust community is very concerned about performance. This may seem trivial, but it has deep implications. Most notably, Rust code is always compiled from source, and there is no stable ABI (yet). This means that even the standard library provided data-structures can be remodeled extensively as long as their API is left untouched, and leads to Rust having the best-performing HashMap3 of all languages in its standard library:

  1. It started with Robin-Hood Hashing with Backward Shifting Deletion, which was already faster than std::unordered_map.
  2. Then moved to a completely different hash-map, based on Swiss Table once Abseil was released.

By comparison, the C++ standard library implementations of std::unordered_map cannot be changed4, nor can their std::regex implementations...

The second advantage of Rust is trust5: the Rust developer can put their trust in the compiler, and count on it to prevent users from accidentally fiddling with private data or violating soundness:

  • In C, it's common to forward-declare structs in header, but never expose their definition so users can't (accidentally) fiddle with them. Unfortunately, the use of such "opaque pointers" then is generally followed by heap-allocating the struct... which is detrimental to performance. In C++ and Rust, that's never a problem, so C++ and Rust programs allocate less.
  • In C and C++, it's common to program defensively. Copies are made when the lifetime of the input is unclear, for example, to avoid use-after-free. In Rust, that's never a problem, so Rust developers are more likely to be brash and avoid copies... knowing the compiler has their back.

And finally, the Rust language has a few tricks up its sleeve that may lead to better code out of the box:

  • Rust has fine aliasing control from the get go:
    • This means no Strict Aliasing rule is necessary, greatly avoiding char* (and co) performance pitfalls.
    • This means noalias (the LLVM equivalent of __restrict) being used profusely and automatically, as &mut T is __restrict T*.
  • Rust has niche optimizations. That is, it knows some types do not use all their values, and will "pack" enum discriminants in the unused values whenever possible. As a result Option<bool> is 1 byte (like bool) and Option<NonNull<T>> (an option non-null pointer to T) is the same size as *mut T (a possibly null pointer to T).

(It's not all roses, though, the defined behavior of signed integer overflows prevent a number of integer-based loop optimizations... though the impact of that is likely low)

3 Bryan Cantrill, who used to be a C kernel hacker at Sun Microsystems, was surprised the first time he naively translated a little C program he had around to Rust to get a feel of the language. Being its first Rust foray, he expected his lack of proficiency in the language would result in slow code... but his Rust program ran faster than his C one, on top of being shorter! He double-checked the output, and after concluding both were correct, did the only thing that made sense: he profiled them. It turns out that in his C program he had hand-rolled a quick hash-map implementation, since dependencies are so annoying in C, while in Rust he had just used the standard one... and his quick C implementation was quite naive. Nowadays, Bryan Cantrill is a Rust kernel hacker ;)

4 And that's on top of inheriting a crippling "memory stability" guarantee from std::map, in order to be more of a drop-in replacement.

5 You can't spell Trust without Rust.

2 of 6
54

The assumptions are wrong twice:

  • safer code does not necessarily mean more instructions, when the safety is obtained with safer language design and rules;
  • one language is not faster than another: it's language implementations that are.

About the claim on faster and safer, there is an extensive study comparing performances of languages that concludes with a benchmark that Rust can be faster and more energy efficient than C++. At the same time, you can't have it all and it appears that for this specific benchmark, C++ is more memory efficient.

But general statements about language performance and safety are always misleading:

  • Benchmarks are only valid for one kind of problem and with a given algorithm. If you look at the details of the study, you'll find out that for 2 among the 10 benchmarks (e.g. binary trees), C++ is faster and more energy efficient.
  • Benchmarks measure a particular implementation and not a general language. For C++ there can be much slower code depending on compiler options. And you can have compilers with higher or lower performance for the same language.
  • Real life software also often require use of libraries or frameworks, and safety is then the one of the weakest link in the chain (Update: 2024 article What Recent Vulnerabilities Mean to Rust from the SEI, shows two interesting non-Rust examples that affected Rust).

My advice: choose the language that is the most suitable for the kind of problems you are trying to solve.

Disclosure: I'm not a Rustler

🌐
ByteSnap
bytesnap.com › bytesnap design › uncategorized › rust programming language vs c for embedded systems
Rust Programming Language vs C for Embedded Systems
August 30, 2024 - However, with the rise of Rust and its popularity among developers on platforms like Stack Overflow, there is a growing debate over its potential to replace C as the dominant language in operating systems, device drivers, and open-source embedded systems programming.
🌐
Incredibuild
incredibuild.com › home › blog › rust vs c++: is it good for enterprise?
Rust vs C++: Comparison for Enterprises - Incredibuild
November 19, 2025 - Rust is often touted as a competitive language to C++, providing memory-safe functionality at compile-time, but without the use of a garbage collector as in other languages like Java or Go, thus enabling runtime determinism, low latency, and ...
🌐
Quora
quora.com › Is-Rust-a-better-programming-language-than-C-Should-someone-who-is-proficient-in-C-C-Java-Python-etc-also-learn-Rust
Is Rust a better programming language than C++? Should someone who is proficient in C/C++/Java/Python/etc. also learn Rust? - Quora
Answer (1 of 4): 1. Is Rust a better programming language than C++? - to some extent it is subjective, but personally I don’t think so. Rust is built upon a premise of guarantees of memory safety - which guarantees, however, fall apart with the very first {unsafe} block within your app code.
🌐
TechTarget
techtarget.com › searchapparchitecture › tip › Rust-vs-C-Differences-and-use-cases
Rust vs. C++: Differences and use cases explained | TechTarget
Developers use Rust for general programming, web development, data science and video gaming, as well as for augmented reality (AR), virtual reality (VR) and blockchain projects. C++ came about commercially in 1985, while Rust's first stable release was 30 years later, in 2015.
🌐
BairesDev
bairesdev.com › home › blog › software development
Rust Vs C++ Performance: When Speed Matters
It was introduced as a powerful, all-purpose, very fast programming language that is focused both on safety and performance. Rust is an example of one of the latest languages that have been touted as a “C-killer.”