Originally posted by Luke_Wolf
View Post
Announcement
Collapse
No announcement yet.
Rust Infrastructure Pull Request Submitted For Linux 6.1!
Collapse
X
-
Originally posted by jacob View Post
- Rust is generally better at autovectoring than C
And even in integers where it does well, you have to be careful about the indices else you prevent the compiler from deducing that bounds checking can be elided out (if triggered on multiple arrays, this can be a harsh perf hit). Iterators usually help with auto-vectorization, but not all algorithms can be mapped cleanly into them.
* If anyone here is curious, fast-math can be used in stable using the linker-plugin-lto flag.
- Likes 2
Comment
-
Originally posted by jacob View Post
I find it to be on the worse side. Go in particular compiles nearly instantaneously. Rust is usually similar or slightly better than C++, and not terribly worse than C because of its preprocessor.
The entire complaint is totally absurd.
- Likes 1
Comment
-
Originally posted by bug77 View PostAh, the old fallacy.
It's been proven time and again Rust is every bit as fast as C.
(*) Of course esoteric programming languages will do whatever. Specifications of common general-purposes programming languages however generally don't say "this has to execute in 17 nanoseconds". At best, they'll mention the scaling characteristic of certain APIs (e.g. C++'s std::map should be logarithmic with #elements -> \infinity).
- Likes 1
Comment
-
Originally posted by jacob View Post
I find it to be on the worse side. Go in particular compiles nearly instantaneously. Rust is usually similar or slightly better than C++, and not terribly worse than C because of its preprocessor.
- Likes 4
Comment
-
Originally posted by uxmkt View PostAh, the old fallacy. Languages don't have an intrinsic speed(*), so it's nonsense to say "X is faster/as fast as/slower than Y". It's all a property of implementations.
- Likes 2
Comment
-
Originally posted by jacob View PostNot even that. Fortran has always been faster.
Originally posted by jacob View PostPlus C's million dollar mistake with zero terminated strings means that trivial operations like strlen() are O(n) instead of O(1).
- Likes 1
Comment
-
Originally posted by Weasel View PostYou have restrict in C so no.
But who gives a shit about the standard library? Nobody forces you to use it. You can use length-prefixed strings in C just fine.
- Likes 2
Comment
-
Originally posted by karolherbst View Post
Most won't if the language doesn't provide the interfaces. A good and reliable standard library is the most important thing for a good programming language.
- Likes 1
Comment
Comment