Performance problem with Euler problem and recursion on Int64 types

后端 未结 6 1511
[愿得一人]
[愿得一人] 2020-12-16 15:38

I\'m currently learning Haskell using the project Euler problems as my playground. I was astound by how slow my Haskell programs turned out to be compared to similar program

6条回答
  •  鱼传尺愫
    2020-12-16 16:14

    dberg, I feel like all of this got off to a bad start with the unfortunate -O flag. Just to emphasize a point made by others, for run-of-the-mill compilation and testing, do like me and paste this into your .bashrc or whatever:

    alias ggg="ghc --make -O2"
    alias gggg="echo 'Glorious Glasgow for Great Good!' && ghc --make -O2 --fforce-recomp"
    

提交回复
热议问题