News for hackers. Stuff that matters.
Re:Is Rust faster than C? by groundzeros2015 on Wednesday January 14, 2026 @10:05AM (#46616846)
got any to share? Should I assume native gui in these these rust performance debates?
Re:Is Rust faster than C? by tcfhgj on Wednesday January 14, 2026 @10:19AM (#46617017)
Re:Is Rust faster than C? by groundzeros2015 on Wednesday January 14, 2026 @12:27PM (#46619023)
What do you think are good use cases for multi threading in these editors?
Re:Is Rust faster than C? by steveklabnik on Wednesday January 14, 2026 @01:27PM (#46620222)
"don't block the ui thread" is a pretty classic aphorism in any language.
Re:Is Rust faster than C? by johnisgood on Thursday January 15, 2026 @04:12AM (#46630052)
Hmm. "Fearless concurrency" and the flagship examples are... background threads for search and not freezing the UI?

That is GUI programming 101 from the Win32 era. Every Tcl/Tk app, every GTK app, every Qt app has been doing this for 25+ years.

If Rust's concurrency story were genuinely revolutionary, you would expect examples like:

- Lock-free data structures that are actually hard to get right

- Complex parallel algorithms with non-trivial synchronization

- Work-stealing schedulers with provable correctness

Instead we have "we run grep in a background thread"?

Re:Is Rust faster than C? by steveklabnik on Thursday January 15, 2026 @10:12AM (#46633624)
When a basic question is asked, a basic answer is given. I didn’t say that I think that’s the coolest or most interesting answer. It’s just the most obvious, straightforward one. It’s not even about Rust!

(And also, I don’t think things like work stealing queues are relevant to editors, but maybe that’s my own ignorance.)

Re:Is Rust faster than C? by johnisgood on Thursday January 15, 2026 @12:08PM (#46635686)
You cannot have it both ways though. Either these are meaningful examples of Rust's benefits, or they are not worth mentioning.

In a thread about Rust's concurrency advantages, these editors were cited as examples. "Don't block the UI thread" as justification only works if Rust actually provides something novel here. If it is just basic threading that every language has done for decades, it should not have been brought up as evidence in the first place.

Plus if things like work-stealing queues and complex synchronization are not relevant to editors, then editors are a poor example for demonstrating Rust's concurrency story in the first place anyway.

Re:Is Rust faster than C? by steveklabnik on Thursday January 15, 2026 @02:29PM (#46637876)
Here is the question that was asked:

> What do you think are good use cases for multi threading in these editors?

That question is not even about Rust. I answered the question, not some other related question.

Re:Is Rust faster than C? by tcfhgj on Thursday January 15, 2026 @06:37PM (#46641044)
The editors (and the desktop environment) are examples for apps with a GUI in Rust, to show people indeed create apps with GUIS in Rust, nothing else.
Re:Is Rust faster than C? by tcfhgj on Wednesday January 14, 2026 @01:05PM (#46619712)
search, linting
Re:Is Rust faster than C? by gf000 on Wednesday January 14, 2026 @10:24AM (#46617069)
Well, what about small CLI tools, like ripgrep and the like? Does multithreading not matter when we open a large number of files and process them? What about compilers?
Re:Is Rust faster than C? by groundzeros2015 on Wednesday January 14, 2026 @12:09PM (#46618752)
Sure. But the more obviously parallel the problem is (visiting N files) the less convincing it is that rust will be superior because it offers complex multithreading primitives.

To over explain, if you just need to make N forks or kick of N threads then it’s very easy to do this correctly in C. The cases where I’m going to carefully maintain shared mutable state with locking are cases where the parallelism is less efficient (Ahmdal’s law).

Java style apps that just haphazardly start threads are what rust makes safer. But that’s a category of program design I find brittle and painful.

Re:Is Rust faster than C? by gf000 on Wednesday January 14, 2026 @12:47PM (#46619345)
> The example you gave of a compiler is canonically implemented as multiple process making .o files from .c files, not threads.

This is a huge limitation of C's compilation model, and basically every other language since then does it differently, so not sure if that's a good example. You do want some "interconnection" between translation units, or at least less fine-grained units.

Re:Is Rust faster than C? by groundzeros2015 on Wednesday January 14, 2026 @01:02PM (#46619646)
And yet despite that theoretical limit C compiles faster than any other language. Even C++ is very fast if you are not using header-only style.

What’s better? Rust? Haskell? Swift?

It’s very hard to do multithreading at a more granular level without hitting amdahl’s law and synchronization traps.

Re:Is Rust faster than C? by pjmlp on Thursday January 15, 2026 @01:55AM (#46629004)
No it doesn't, try it against a language with modules support, even the oldie Turbo Pascal for MS-DOS.
Re:Is Rust faster than C? by groundzeros2015 on Saturday January 17, 2026 @11:20AM (#46659238)
Turbo pascal compiles faster because of better parallelization?
Re:Is Rust faster than C? by gf000 on Thursday January 15, 2026 @04:55AM (#46630385)
It reminds me of the joke that "I can do math very fast", probed with a multiplication and immediately answering some total bollocks answer. - "That's not even close" - "Yeah, but it was fast"

Sure, it's not a trivial problem, but why wouldn't we want better compilation results/developer ergonomics at the price of more compiler complexity and some minimal performance penalty?

And it's not like the performance doesn't have its own set of negatives, like header-only libraries are a hack directly manifested from this compilation model.

Re:Is Rust faster than C? by groundzeros2015 on Saturday January 17, 2026 @11:19AM (#46659230)
your topic is shifting from multi-threading benefits in language compilation, to ergonomics of C headers.
Re:Is Rust faster than C? by xpe on Wednesday January 14, 2026 @10:20AM (#46617020)