Biweekly Triweekly update from the GHC DevX team at IOG.
Previous updates can be found here.
- Sylvain: I've noticed that fusion wasn't happening for
foo = sum [0..123456] :: Word64was compiling into slow code using
Integeroperations (see GHC#23578). Jaro has made a fix for the fusion operation (thanks!). However it turned out that the JS implementation of 64-bit operations is sometimes slower than using
Integeroperations (see GHC#23597) so fixing fusion made the JS code slower! See Jaro's benchmark's results. I've updated the implementation of
plusWord64to fix this specific case (see GHC!10873). With my fix we get a x3.5 speedup on the previous example and with Jaro's fusion fix we get another x5.4 speedup. Overall, from 4.8s to 0.25s!
- Jeff: I've narrowed down the performance regression in the Cardano code base when migrating to GHC-9.2.x to two functions: one which I fully understand and have a fix and another which I still do not understand. However, I have begun writing my report and will use this as a case study for the optimization handbook. I still do not understand the regression, but have found numerous other problems in the code base; such as an overly pervasive use of
INLINEpragmas, which are leading to code bloat and are hurting other good optimizations such as worker/wrapper.
CI / Testsuite
"use strict") on node.js and found some missing declarations that went unnoticed when running in regular mode. Pushed a few fixes. See GHC#23775 and GHC!11028.
Josh: worked on adding CI to
ghcjs-baseusing the DevX Github actions DevX.
Luite: We found that emsdk 3.1.42 changed the layout of the
autoconftools. Additionally we have more toolchain version checks now to prevent inconsistencies between the Haskell code (
processpackage is now merged. See process!292.
Luite: Found an issue with incorrect separation of constants such as flags/masks between the node.js platform (mostly seen by jsbits
.jsfiles) and those seen by Haskell
.hscfiles. A solution is mostly complete, but depends on GHC!10918 to be merged first. See GHC#23777.
MK_TUP*macros where these weren't using the correct constructor names. See:
Josh: Worked on updating
Josh: Worked on updating certain
ghcjs-basefunctions that render
Integralvalues as decimal and hexadecimal
Incomplete Record Selectors
- Bartek: MR fully merged. See GHC!10736
- Bartek: MR fully merged. See GHC!10902
Sylvain: fixed two typos in CPP constants used by the JS rts (noticed by Luite). These would only be problematic in uncommon erroring circumstances, explaining why they haven't been caught earlier. See GHC#23650 and GHC!10862.
Jeff: Finished and submitted the camera ready version of the GHC modularity paper. See you at ICFP!
Bartek: Working on Record Wild Cards not producing custom deprecations when used. See GHC!23382