(no title)
bedman12345 | 5 months ago
It’s really complicated. Everybody includes lenses https://hackage.haskell.org/package/lens I don’t want to read all that stuff just for imperative syntax.
It’d both slow and hard to read. Compare these two: https://benchmarksgame-team.pages.debian.net/benchmarksgame/... https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
The c examples complexity lies in using SIMD. If you know simd it’s easy. You should know simd, it’s useful. The Haskell example is drivel. Long complicated and in the end hopelessly slow compared to the c example. You could als use simd in Haskell, but then it would just be C with extra steps.
jrrv|5 months ago
> If you know simd it’s easy.
Surely "if you know Haskell it's easy" is equally applicable.
bedman12345|5 months ago
Plain crazy take. The c example uses basic coding to implement some clever maths with special fast instructions. Thehaskell example is just some dumb algo implemented with complicated programming. There is obviously nothing good about that.
You can also look at a c example without simd https://benchmarksgame-team.pages.debian.net/benchmarksgame/... It’s shorter and simpler and faster than the Haskell version. It’s not even close???
jghn|5 months ago
You did not provide objective measures. You're just providing subjective opinions.
bedman12345|5 months ago