
I'm working on a GUI application in qtHaskell, and I have a bit of a bind. Using ghci, it launches quickly but runs slowly. On the other hand, compiling (mainly linking) takes a while---several minutes. The truth is that I can compile it much faster if I selectively import the needed modules, so figure the actual compilation/link time is more like 15 to 30 seconds. (This is Windows on a very old laptop.) I'm used to working in Python, so I'm used to a nearly instant code-build-test cycle, and GUI applications in PyQt run briskly, faster than ghci/qtHaskell. Now I'm wondering if Hugs is a faster interpreter. So during development I don't want to give up the quick cycle you get with an interpreter, but the application may be much too slow to use in any meaningful way without compilation. Any advice welcome. Maybe there is a way to speed up the interpretation. -Mike

Am Freitag 18 September 2009 04:42:32 schrieb Michael Mossey:
I'm working on a GUI application in qtHaskell, and I have a bit of a bind. Using ghci, it launches quickly but runs slowly. On the other hand, compiling (mainly linking) takes a while---several minutes. The truth is
Is the library you're using built with split-objs? If not, that would explain the long link time.
that I can compile it much faster if I selectively import the needed modules, so figure the actual compilation/link time is more like 15 to 30 seconds. (This is Windows on a very old laptop.) I'm used to working in Python, so I'm used to a nearly instant code-build-test cycle, and GUI applications in PyQt run briskly, faster than ghci/qtHaskell.
Now I'm wondering if Hugs is a faster interpreter.
Usually it isn't. It's faster loading the code than ghci, but slower running it.
So during development I don't want to give up the quick cycle you get with an interpreter, but the application may be much too slow to use in any meaningful way without compilation. Any advice welcome. Maybe there is a way to speed up the interpretation.
Smaller modules, so that only the hopefully few modules that were changed or depend on a changed module need be recompiled? (Not sure that would help with linking, though)
-Mike

Hello Michael, Friday, September 18, 2009, 6:42:32 AM, you wrote:
Now I'm wondering if Hugs is a faster interpreter.
2x slower, and incompatib;e with qtHaskell
meaningful way without compilation. Any advice welcome. Maybe there is a way to speed up the interpretation.
if compilation is fast and only linking is slow, you may recompile haskell modules every time but use ghci to omit linking. just execute ghc compilation command inside ghci before running your app -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

Yeah linking in windows is _very_ slow. Supposedly this is because the
linker forks a lot of processes. In linux this is fine as forking is dirt
cheap, but in windows (at least older versions, not completely sure about
vista or 7) forking is expensive.
Building a Qt app on my EEE in linux only takes a couple seconds. Building
in windows on my dual core 3.2Ghz machine takes 15-30 seconds. It's pretty
sad.
I second Bulat's suggestion. If you can compile everything and just use ghci
to avoid the link you should be able to get the best of both works.
- Job
On Fri, Sep 18, 2009 at 12:34 AM, Bulat Ziganshin wrote: Hello Michael, Friday, September 18, 2009, 6:42:32 AM, you wrote: Now I'm wondering if Hugs is a faster interpreter. 2x slower, and incompatib;e with qtHaskell meaningful way without compilation. Any advice welcome. Maybe there is a
way to speed up the interpretation. if compilation is fast and only linking is slow, you may recompile
haskell modules every time but use ghci to omit linking. just execute ghc
compilation command inside ghci before running your app --
Best regards,
Bulat mailto:Bulat.Ziganshin@gmail.com _______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (4)
-
Bulat Ziganshin
-
Daniel Fischer
-
Job Vranish
-
Michael Mossey