Newest at the top
2025-01-08 21:32:56 +0100 | Digit | (~user@user/digit) Digit |
2025-01-08 21:32:09 +0100 | Digit | (~user@user/digit) (Read error: Connection reset by peer) |
2025-01-08 21:32:08 +0100 | l_k | (~student@213.24.133.217) (Ping timeout: 244 seconds) |
2025-01-08 21:29:32 +0100 | l__k | (~student@217.107.126.148) |
2025-01-08 21:27:12 +0100 | <c_wraith> | it is. |
2025-01-08 21:26:25 +0100 | <EvanR> | wait a minute, isn't that what loop unrolling is |
2025-01-08 21:26:03 +0100 | <EvanR> | I guess that makes sense on multiple levels |
2025-01-08 21:25:58 +0100 | <EvanR> | a self recursive function can't be inlined |
2025-01-08 21:21:58 +0100 | <c_wraith> | So yeah... When *that* is the issue I'm trying to demonstrate, INLINE is useless. |
2025-01-08 21:21:40 +0100 | <c_wraith> | Oh, right. "GHC tries not to select a function with an INLINE pragma as a loop breaker, but when there is no choice even an INLINE function can be selected, in which case the INLINE pragma is ignored. For example, for a self-recursive function, the loop breaker can only be the function itself, so an INLINE pragma is always ignored." |
2025-01-08 21:18:43 +0100 | weary-traveler | (~user@user/user363627) user363627 |
2025-01-08 21:17:46 +0100 | <c_wraith> | And, yeah. OPTIONS_GHC -O2 does in fact override cabal's global optimization level. It just wasn't visible because of the cross-module stuff |
2025-01-08 21:17:39 +0100 | cjay | (cjay@nerdbox.nerd2nerd.org) cjay |
2025-01-08 21:17:00 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2025-01-08 21:15:58 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2025-01-08 21:14:40 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) JuanDaugherty |
2025-01-08 21:12:59 +0100 | gorignak | (~gorignak@user/gorignak) gorignak |
2025-01-08 21:11:05 +0100 | <c_wraith> | And while it can do that in a single module with -O2, it does not appear to do it cross-module with -O2 |
2025-01-08 21:10:38 +0100 | <c_wraith> | It needs a worker/wrapper transform for GHC to inline it at all |
2025-01-08 21:10:21 +0100 | <c_wraith> | I think the INLINE pragma is being ignored because the definition it would need to apply to is directly recursive |
2025-01-08 21:09:51 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Client Quit) |
2025-01-08 21:09:51 +0100 | <c_wraith> | Oh. No, I think this idea just doesn't work. |
2025-01-08 21:07:00 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en |
2025-01-08 21:04:40 +0100 | visilii | (~visilii@213.24.125.237) (Ping timeout: 265 seconds) |
2025-01-08 21:03:50 +0100 | hseg | (~gesh@46.120.21.249) (Ping timeout: 272 seconds) |
2025-01-08 21:00:44 +0100 | caconym | (~caconym@user/caconym) caconym |
2025-01-08 21:00:35 +0100 | visilii_ | (~visilii@188.254.110.9) |
2025-01-08 21:00:04 +0100 | caconym | (~caconym@user/caconym) (Quit: bye) |
2025-01-08 20:55:56 +0100 | rvalue | (~rvalue@user/rvalue) rvalue |
2025-01-08 20:55:26 +0100 | rvalue | (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
2025-01-08 20:53:50 +0100 | <c_wraith> | I might need to compile it as a sublibrary |
2025-01-08 20:53:26 +0100 | <c_wraith> | Huh. Looks like cabal might override the -O2 in an OPTIONS_GHC pragma |
2025-01-08 20:52:07 +0100 | weary-traveler | (~user@user/user363627) (Remote host closed the connection) |
2025-01-08 20:41:28 +0100 | raym | (~ray@user/raym) raym |
2025-01-08 20:35:57 +0100 | <tomsmeding> | which sounds like what you want here |
2025-01-08 20:35:51 +0100 | <tomsmeding> | > So GHC guarantees to inline precisely the code that you wrote, no more and no less. |
2025-01-08 20:35:44 +0100 | <tomsmeding> | but the GHC user's guide says: ( https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/pragmas.html#inline-and-noinline-pr… ) |
2025-01-08 20:35:15 +0100 | <tomsmeding> | yeah this may be too much trickery |
2025-01-08 20:33:15 +0100 | <c_wraith> | Huh. Not sure how INLINE interacts with this. |
2025-01-08 20:30:11 +0100 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2025-01-08 20:28:16 +0100 | <tomsmeding> | ctrl-D is often faster than typing "exit" ... oh too late |
2025-01-08 20:28:10 +0100 | mari41300 | (~mari-este@user/mari-estel) (Remote host closed the connection) |
2025-01-08 20:28:06 +0100 | <mari41300> | sorry i'm tired. See you all o/ |
2025-01-08 20:27:55 +0100 | <mari41300> | :P |
2025-01-08 20:27:51 +0100 | <mari41300> | exit |
2025-01-08 20:27:37 +0100 | <tomsmeding> | c_wraith: is it just one function? mark them as INLINE, use them (trivially, in a wrapper function) in two separate modules, compile those two modules with different options? |
2025-01-08 20:27:21 +0100 | <smiesner> | thanks all :) |
2025-01-08 20:27:08 +0100 | <smiesner> | tomsmeding: will try that for sure! |
2025-01-08 20:24:02 +0100 | <tomsmeding> | if that works, then you can `:def R \_ -> Prelude.return ":!cabal build\n:r"` to define a ghci command :R that first builds and then reloads ;) |
2025-01-08 20:23:37 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |