2025/01/08

Newest at the top

2025-01-08 22:01:40 +0100 <JuanDaugherty> but ty anyway
2025-01-08 21:58:13 +0100 <JuanDaugherty> to be clear, i did not go to the damn enwiki relational algebra article
2025-01-08 21:56:38 +0100 <JuanDaugherty> hololeap, ofc, i;m juan@acm.org
2025-01-08 21:56:14 +0100lxsameer(~lxsameer@Serene/lxsameer) (Ping timeout: 245 seconds)
2025-01-08 21:56:03 +0100Digit(~user@user/digit) Digit
2025-01-08 21:55:57 +0100 <c_wraith> The only thing it doesn't do is any kind of unrolling
2025-01-08 21:55:25 +0100 <c_wraith> inlining the wrapper copies in the worker definition so that things can be inlined into it.
2025-01-08 21:55:14 +0100Digit(~user@user/digit) (Read error: Connection reset by peer)
2025-01-08 21:54:47 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) machinedgod
2025-01-08 21:54:46 +0100avdb13(~avdb13@2001-14ba-a0a9-f200--18c.rev.dnainternet.fi) (Remote host closed the connection)
2025-01-08 21:53:56 +0100 <Leary> Well, worker/wrapper only lets you inline the wrapper. This would let you inline the entire body, so your other module can optimise it differently.
2025-01-08 21:53:23 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-01-08 21:51:37 +0100 <c_wraith> Leary: if you're rewriting it to make it inline properly, you might as well worker/wrapper it yourself
2025-01-08 21:51:19 +0100 <hololeap> JuanDaugherty: are you aware of https://en.wikipedia.org/wiki/Relational_algebra
2025-01-08 21:37:43 +0100 <Leary> Perhaps artificially introduce a loop breaker: `bar = ... bar ...` --> `foo = bar; {-# INLINE bar #-}; bar = ... foo ...`
2025-01-08 21:36:28 +0100 <c_wraith> But that means you need to cooperate at the call site. eww.
2025-01-08 21:36:14 +0100 <c_wraith> Further reading of the docs suggests you might be able to do it with INLINEABLE *and* the magic inline function. https://hackage.haskell.org/package/base-4.21.0.0/docs/GHC-Base.html#v:inline
2025-01-08 21:35:00 +0100 <c_wraith> within a single module, GHC will do a worker-wrapper transform to inline directly recursive definitions at -O2. But making that optimization fire across modules seems hard.
2025-01-08 21:32:56 +0100Digit(~user@user/digit) Digit
2025-01-08 21:32:09 +0100Digit(~user@user/digit) (Read error: Connection reset by peer)
2025-01-08 21:32:08 +0100l_k(~student@213.24.133.217) (Ping timeout: 244 seconds)
2025-01-08 21:29:32 +0100l__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 +0100weary-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 +0100cjay(cjay@nerdbox.nerd2nerd.org) cjay
2025-01-08 21:17:00 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-01-08 21:15:58 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-01-08 21:14:40 +0100JuanDaugherty(~juan@user/JuanDaugherty) JuanDaugherty
2025-01-08 21:12:59 +0100gorignak(~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 +0100ash3en(~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 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2025-01-08 21:04:40 +0100visilii(~visilii@213.24.125.237) (Ping timeout: 265 seconds)
2025-01-08 21:03:50 +0100hseg(~gesh@46.120.21.249) (Ping timeout: 272 seconds)
2025-01-08 21:00:44 +0100caconym(~caconym@user/caconym) caconym
2025-01-08 21:00:35 +0100visilii_(~visilii@188.254.110.9)
2025-01-08 21:00:04 +0100caconym(~caconym@user/caconym) (Quit: bye)
2025-01-08 20:55:56 +0100rvalue(~rvalue@user/rvalue) rvalue
2025-01-08 20:55:26 +0100rvalue(~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