3 ms·
Indeed. Many of the high-performance libraries like bytestring, aeson, etc. are written like this. Haskell's performance is very good for nearly everything I w
by thirsteh 13y ago
Indeed. Many of the high-performance libraries like bytestring, aeson, etc. are written like this.
Haskell's performance is very good for nearly everything I write--and I don't write anything nearly that low level--but I can't deny that this is one of the uglier sides of the language.
On the other hand: In most other languages you'd just be dropping down to the C ABI (that's easy to do in Haskell, too, for that matter.) It is kind of impressive that you can write code that is as fast as C without writing C, even if it is ugly.
- 1amzave 13y ago> It is kind of impressive that you can write code that is as fast as C without writing C, even if it is ugly. Impressive, perhaps -- but from a maintainability perspective I think I might prefer to pay the cost of jumping the language barrier to be able to write natural, comprehensible C rather than staying within one language and dealing with an unreadable jumble, even if it performs as well.
- thu 13y agoThe final Haskell code, while being low-level, is not unreadable jumble. Maybe you're talking about the generated Core or the C-- code.