Remix.run Logo
When rust ≠ performance. a lesson in developer experience(suriya.cc)
33 points by suriya-ganesh 3 hours ago | 16 comments
notorandit 37 minutes ago | parent | next [-]

Of course rust is not performance.

Rust is a programming language. Performance is a mix of programmer's ability, clever design and compiler optimizations.

jvanderbot 18 minutes ago | parent [-]

For a long time, Rust == performance because a _lot_ of people moved into Rust that had never really done programming with a concurrency-sane compiled programming language. For them, Rust was synonymous with performance!

Many supporting crates reinforced this. Rayon, Tokio (though not "performant", it was an improvement over naive impl), etc made jumping from hello world to parallel/concurrent execution pretty simple.

But I'm glad to see the downturn on that hype cycle.

binhex 2 hours ago | parent | prev | next [-]

> but because we have this data (file name, etc.) passed back and forth between different layers in the code. we were doing lots of .clone() and db.open() at different layers to fetch the same data. The interesting part for me was that, this change reduced our

Reduced your what? The article seems to be cut off.

taeric 2 hours ago | parent | next [-]

I'm assuming it was going to say lines of code. It is highlighting that more was deleted than added.

larpingscholar an hour ago | parent [-]

I agree. Though the line count is meaningless as the vibe coded diff has pointless formatting and whitespace changes.

suriya-ganesh an hour ago | parent [-]

I wrote that PR and can guarantee you that it was not vibe coded.

the reason why I thought this PR was interesting is that, it only needed ~ 4 lines of real change, everything else was cascades due to that change. and the performance did improve with that "pointless formatting and whitespace changes"

suriya-ganesh an hour ago | parent | prev [-]

ah! sorry. I meant to say, "the interesting part for me was that we removed code to improve performance."

pointlessone an hour ago | parent | prev | next [-]

This is extremely sparse on details.

bitexploder 44 minutes ago | parent | next [-]

Rust is a general purpose systems programming language. There are very few situations where you cannot attain C like performance with Rust. Skill issue, most likely.

koakuma-chan an hour ago | parent | prev [-]

It feels like a rage bait. It's clearly their own fault and has nothing to do with Rust.

LAC-Tech an hour ago | parent [-]

maybe Rustaceans shouldn't rage so easily?

kykat an hour ago | parent | prev | next [-]

algorithm design and managing memory is something you have to think about regardless of what language you use, that should be obvious. Using rust doesn't guarantee correctness or performance, that should also be obvious.

Rust has features that make it easier to make correct and performant software, I think most programmers would agree?

Please stop this rust clickbait nonsense.

9rx an hour ago | parent | next [-]

> Please stop this rust clickbait nonsense.

But then new content on HN would decline to nearly nothing.

themafia an hour ago | parent | prev [-]

> Using rust doesn't guarantee correctness or performance, that should also be obvious.

Judging from the most vocal segment of their community it's very much not obvious to them.

> make it easier

Define "easier." It's harder to make mistakes. I'm not sure this equates to developer "ease" in any way. In fact, if it's meant to be effective, it should be quite the opposite.

> rust clickbait nonsense.

It cuts both ways. There is a huge volume of "I switched to Rust and got 1% additional performance over C" posts here.

LAC-Tech an hour ago | parent | prev [-]

I wonder to what extent the complexity of the rust language hurts performance. We all only have so much mental capacity, if much of it is spent on the various different intersections of rust's features, that reduces how much we can spend on making things fast.

(I like Rust btw)

nicoburns 21 minutes ago | parent [-]

The alternatives with the potential to be as fast (C, C++, D, zig) are more complex in this regard because they make memory safety and lifetime tracking something that you have to keep track of in your head. Rust's biggest win is removing that mental overhead while allowing you to achieve the same performance as those other languages.