Originally posted by jacob
View Post
Announcement
Collapse
No announcement yet.
Rust Infrastructure Pull Request Submitted For Linux 6.1!
Collapse
X
-
- Likes 5
-
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. You can have a shit C compiler/runtime (hi MSVC), and you can have a shit Rust compiler/runtime.
(*) 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).
PS: no, I don't care that you "can" roll out your own alternative string representation in C. It's totally pointless because every single existing API and library, down to basic printf(), expects zero terminated strings. Period. Or perhaps should I say \0
- Likes 1
Comment
-
Originally posted by jacob View Post
Not even that. Fortran has always been faster. Plus C's million dollar mistake with zero terminated strings means that trivial operations like strlen() are O(n) instead of O(1). C is considered fast because its bias towards base+offset addressing was well suited for the PDP11. Later, CPUs' branch predictors and other heuristics were based on stats derived from existing code, that is mostly C. So essentially CPU manufacturers made huge efforts to produce CPUs where C could run well, rather than the other way around.
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 2
Comment
-
Originally posted by karolherbst View Post
I am not arguing with trolls who don't actually code themselves, but only have "theoretical pointless discussions" around programming languages...
Everybody doing it for a living will tell you that it's a no brainer to have proper tooling around a language, which includes a good and competent compiler and a competent standard library. We don't want to have to think for 5 hours which of the 100 implementations I have to use to get peak performance. We want to use the language. And e.g. Rusts _huge_ benefit is, that it actually made the package managing part of the language and that third party libs which make sense, get pulled into the stdlib after a controlled process.
Having a standard would make all of that much harder and would actually sabotage it.
If you don't believe me, ask other full time programmers, they'll probably tell you something similar.
Also having standard for a language is largely a gimmick unless that standard provides something useful to the table (i.e. a formally verified specification which can guarantee certain properties). C has no such thing, and the main reason a standard in C exists in the first place is due to historical reasons (back then proprietary compilers were a thing where as now its kind of stupid, even having multiple OS implementations of a language is typically rare). I guess you can argue that C's role today is largely delegated to being a high level assembler, but LLVM is doing a better job of that and again, there isn't a LLVM standard either.Last edited by mdedetrich; 02 October 2022, 09:23 PM.
- Likes 3
Comment
-
Originally posted by andrei_me View Post
Lol, you are answering the developer of rusticl, the OpenCL implemented in rust, also AFFAIR karolherbst is a Mesa developer, can't remember which driver
- Likes 4
Comment
-
Originally posted by mdedetrich View Post
I don't know the history behind it, but having zero terminated strings is by far one of the stupidest things in C
I've read an interview with either Kernighan or Ritchie, don't remember which, who said that he considered zero terminated strings the worst mistake he ever did.
- Likes 2
Comment
-
Originally posted by mdedetrich View Post
Indeed and this isn't even something specific to Rust (full time Scala/Java programmer which also have strong package management + cross OS support).
Also having standard for a language is largely a gimmick unless that standard provides something useful to the table (i.e. a formally verified specification which can guarantee certain properties). C has no such thing, and the main reason a standard in C exists in the first place is due to historical reasons (back then proprietary compilers were a thing where as now its kind of stupid, even having multiple OS implementations of a language is typically rare). I guess you can argue that C's role today is largely delegated to being a high level assembler, but LLVM is doing a better job of that and again, there isn't a LLVM standard either.Last edited by jacob; 02 October 2022, 11:41 PM.
- Likes 4
Comment
-
Originally posted by andrei_me View Post
Lol, you are answering the developer of rusticl, the OpenCL implemented in rust, also AFFAIR karolherbst is a Mesa developer, can't remember which driver
- Likes 2
Comment
-
Comment