News for hackers. Stuff that matters.
Re:Rust is now overall faster than C in benchmarks by Blikkentrekker on Sunday January 03, 2021 @04:43PM (#25625539)
The Haskell code on some pathological examples of these implementations that I have seen has so many unsafe construct, strictness annotations, inlining annotations and so forth that it's practically C in a different syntax.

It is not idiomatic Haskell at all and loses all of the touted benefits.

Is there a separate benchmark that only accepts idiomatic code?

Re:Rust is now overall faster than C in benchmarks by igouy on Monday January 04, 2021 @02:01PM (#25636214)
Is there a GHC compiler switch that ensures only "idiomatic code" is compiled?

One can, with sufficient effort, essentially write C code in Haskell using various unsafe primitives. We would argue that this is not true to the spirit and goals of Haskell, and we have attempted in this paper to remain within the space of “reasonably idiomatic” Haskell. However, we have made abundant use of strictness annotations, explicit strictness, and unboxed vectors. We have, more controversially perhaps, used unsafe array subscripting in places. Are our choices reasonable?

http://www.cs.ru.nl/P.Achten/IFL2013/symposium_proceedings_I...

Re:Rust is now overall faster than C in benchmarks by Blikkentrekker on Monday January 04, 2021 @07:13PM (#25640173)
It shows the performance of that variant of Haskell.

But when using that variant all the correctness guarantees that Haskell is known for are no longer on the table.

Re:Rust is now overall faster than C in benchmarks by pjmlp on Sunday January 03, 2021 @05:30PM (#25625837)
Just like C is pimped up BCPL, a language designed to bootstrap the CPL compiler, 10 years younger than ESPOL/NEWP, 10 years younger than Jovial, 6 years younger than PL/I, among other possible examples from the 60's.

Also C was known for not being a fast language on 80's home hardware, ruled by Assembly.

So low level coding for OS isn't coding like C and is just the way for mechanical sympathy, regardless of the language.