3 ms·
The Haskell code on some pathological examples of these implementations that I have seen has so many unsafe construct, strictness annotations, inlining annotati
by Blikkentrekker 6y ago
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?
- pjmlp 6y agoJust 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.
- igouy 6y agoIs 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_IFL2013/ifl2013_submission_20.pdf http://www.cs.ru.nl/P.Achten/IFL2013/symposium_proceedings_I...
- Blikkentrekker 6y agoIt 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.