[Haskell-cafe] Compiled program using OpenGL fails to trigger GPU switch on Mac, but works in GHCi
John Lato
jwlato at gmail.com
Mon Mar 18 00:55:02 CET 2013
Hello,
Unfortunately I don't have much to add.
On Wed, Mar 13, 2013 at 9:51 PM, Jesper Särnesjö <sarnesjo at gmail.com> wrote:
> Hi everybody,
>
> This started out on haskell-beginners, as a question about poor
> performance for a Haskell program using OpenGL. Thanks to a few good
> suggestions there, I've managed to figure out more or less what the
> underlying problem is, but not its cause.
>
> In short, I have two programs, one written in Haskell [1] and one
> written in C [2], that consist of calls to the same functions, in the
> same order, to the same C library, but which do not exhibit the same
> behavior. Further, the Haskell program behaves differently when
> compiled using GHC, and when run in GHCi. I would like to know why
> this is, and how to fix it.
>
There are two major differences between compiled code and code run from
ghci. First, ghci always uses the threaded runtime (compiled with
-threaded). Second, optimization levels.
If you compile your program with -threaded, do you get the desired behavior
(e.g. does it work the same as with ghci)?
John L.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130318/7edac755/attachment.htm>
More information about the Haskell-Cafe
mailing list