News for hackers. Stuff that matters.
Re:A comparison of Rust's borrow checker to the one in C# by neonsunset on Thursday October 31, 2024 @03:59PM (#42010872)
Not sure which benchmarks you have in mind. Could you provide a link to any of those? .NET's standard library never calls into anything C aside from kernel APIs and certain runtime helpers which is a given.

If you meant BenchmarksGame, then it's the other way around - Java is most competitive where it relies heavily on GC[0], and loses in other areas which require capability to write a low-level implementation[1] that C# provides.

The only places where there are C calls are pidigts[2] and regex-redux[3] benchmarks, in both of which the Java submissions have to import pre-generated or pre-made bindings to GMP and PCRE2 respectively. As do all other languages, with varying degrees of "preparation".

[0]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

[1]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

[2]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

[3]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re:A comparison of Rust's borrow checker to the one in C# by vips7L on Friday November 01, 2024 @09:19AM (#42016672)
Im sorry, but calling out to C libraries — regardless of the language — is cheating. Just because everyone in the competition is on steroids doesn’t mean you got there legitimately.
Re:A comparison of Rust's borrow checker to the one in C# by neonsunset on Friday November 01, 2024 @11:39AM (#42018050)
This is a strange reply given that sibling comment points out it's only 2 out of 10 benchmarks where this is allowed because all languages end up calling out to the same libraries.

Even if you prohibit PCRE2, the .NET submissions using out-of-box Regex engine end up being about 4 times faster than Java.

Surprisingly, even though .NET's BigInteger is known for its inefficiency, it ends up being more memory efficient and marginally faster at pidigits than a Java submission that does not use GMP. The implementations are not line-by-line equivalent so may not be perfectly representative of performance of each BigInt implementation.

My point being - if you look at the submissions closer, the data gives much clearer picture and only supports the argument that C# is a very usable language for solving the tasks one would usually reach for C, C++ or Rust instead.

Re:A comparison of Rust's borrow checker to the one in C# by vips7L on Friday November 01, 2024 @12:28PM (#42018640)
Its not a strange reply at all. _All_ of those languages are cheating. Those benchmarks are junk because they don't test implementations in the language.
Re:A comparison of Rust's borrow checker to the one in C# by igouy on Friday November 01, 2024 @01:16PM (#42019251)
Re:A comparison of Rust's borrow checker to the one in C# by igouy on Friday November 01, 2024 @12:27PM (#42018629)
https://www.wilfred.me.uk/blog/2014/10/20/the-fastest-bigint...

Look at all the programming language implementations that provide big integers by calling out to GMP. Why would it be "cheating" when available to all and done openly? Libraries matter.