| dons | Code Comments Main.hs 255 147 StackSet.hs 71 102 XMonad.hs 48 52 TOTAL: 374 301 |
| Zeroth404 | since haskell is converted to C to be compiled, wouln't it just be better to write a haskell compilers in assembly? |
| dons | Zeroth404: ghc does that it generates both C, and assembly, and bytecode |
| Zeroth404 | from haskell to c to asm, right? |
| dons | though now your question confuses me. Zeroth404: nope. ghc generates asm directly. it also generates C directly which gcc then turns into asm |
| Zeroth404 | well then why are haskell apps sometimes slower than C counterparts? |
| dons | ghc -fasm doesn't use C at all Zeroth404: counterparts? |
| dcoutts | Zeroth404: why are some C programs slower than others ? |
| Zeroth404 | counterpart as in a program that does the same thing |
| dons | they don't do the same thing. |
| dcoutts | Zeroth404: why are some implementations of the same algorithm faster than others? |
| Zeroth404 | I figured they typically ran slower because its converted to un-optimized c code before beign broken down to assembly |
| sjanssen | dmwit: let me know if xmonad builds with 6.4, I'll update the dependencies |
| dons | the C code generated isn't the kind of C you'd write by hand. |
| dmwit | sjanssen: It can't find Data.Map -- it says package base-1.0 is hidden. |
| dcoutts | it's more like assembly actually :-) |
| jcreigh | yeah. it segfaults less, for one thing. :) |
| dmwit | I tried putting base>=1.0 in the cabal file, but still no go. |
| Zeroth404 | so its just slower by design? |
| dcoutts | Zeroth404: it's more complicated than you think Zeroth404: 'translating' one language to another is not easy |
| sjanssen | dmwit: try running Setup.lhs configure again? |
| dmwit | sjanssen: Yeah, that did it. Oop, no it didn't. |
| sjanssen | still with the hidden thing? |
| dmwit | Not in scope: `forM_' |
| sjanssen | dmwit: change that to flip mapM_ |
| jcreigh | Zeroth404: Haskell and C are very different languages. Haskell is a much richer language. (Algebraic datatypes, pattern matching, first class functions, closures, typeclasses, rich typing system, etc, etc, etc) The fact that a language like Haskell can even get close to C WRT performance is amazing. (okay, technically, I suppose C has first class functions...but it's not the same) |
| Zeroth404 | I don't know what any of that means :-/ heh |