compiling with -O2 optimization

Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

compiling with -O2 optimization

ivan
Hi,

Is it inadvisable to compile your xmonad.hs with level 2 optimization enabled? I added the following pragma to my config, and haven't had any problems yet:

    {-# OPTIONS_GHC -O2 #-}

I searched issues/commits/google but wasn't able to find any discussion on this

-Ivan.

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: compiling with -O2 optimization

Brent Yorgey
I doubt it makes much difference.  The amount of computation xmonad is doing is relatively small, so optimizations shouldn't make much noticeable difference.  On the other hand it very well may increase compile times (i.e. how long you have to wait after hitting mod-q to do a hot reload).

Disclaimer: I am not a Haskell performance expert.

-Brent

On Mon, Sep 21, 2020 at 8:18 PM ivan <[hidden email]> wrote:
Hi,

Is it inadvisable to compile your xmonad.hs with level 2 optimization enabled? I added the following pragma to my config, and haven't had any problems yet:

    {-# OPTIONS_GHC -O2 #-}

I searched issues/commits/google but wasn't able to find any discussion on this

-Ivan.
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: compiling with -O2 optimization

Dominik Schrempf
In reply to this post by ivan
I think that this only makes sense if you also compile all libraries with -O2.

On September 22, 2020 3:18:10 AM GMT+02:00, ivan <[hidden email]> wrote:
Hi,

Is it inadvisable to compile your xmonad.hs with level 2 optimization enabled? I added the following pragma to my config, and haven't had any problems yet:

    {-# OPTIONS_GHC -O2 #-}

I searched issues/commits/google but wasn't able to find any discussion on this

-Ivan.

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad