8.2.1-rc2 upgrade report

Alberto Valverde alberto at toscat.net
Tue Jun 6 11:38:38 UTC 2017


Hi,

I've finally managed to upgrade all the dependencies of the proprietary app
I mentioned some days ago in this list and there are good and bad
differences I've noticed between 8.0.2 that I'd like to share.

The bad
-----------

* An optimized cold build (-O2)  is about 3 times slower (~53s vs. ~2m55s)
and consumes more memory (~2Gb vs. ~7Gb) at it's peak.

The good
-------------

* An un-optimized cold build (-O0) takes about the same time (~21s, phew!
:) It's maybe even slightly faster with 8.2 (too few and badly taken
measurements to really know, though)
* The optimized executable is slightly faster and allocates less memory.
For this app it makes up for the performance regression of the optimized
build (which is almost always done by CI), IMHO.

I did only a couple of runs and only wrote down [1] the last run results
(which were similar to the previous results) so take these observations
with a grain of salt (except maybe the optimized build slowdown, which
doesn't have much margin for variance to be skewing the results). I also
measured the peak memory usage by observing "top".

In case gives a clue: The app is a multi-threaded 2D spread simulator which
deals with many mmapped Storable mutable vectors and has been pretty
optimized for countless hours (I mean by this that it has (too) many INLINE
pragmas. Mostly on polymorphic functions to aid in their specialization). I
think some of this information can be deduced from the results I'm linking
at the footer. I believe the INLINEs are playing a big part of the slowdown
since the slowest modules to compile are the "Main" ones which put
everything together, along with the typical lens-th-heavy "Types" ones.

I'd like to help by producing a reproducible and isolated benchmark or a
better analysis or ... so someone more knowledgeable than me on GHC
internals can someday hopefully attack the regression. Any pointers on what
would help and where can I learn to do it?

Thanks!


[1] https://gist.github.com/albertov/46fbb13d940f67a569f9a25c1cb8154c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20170606/0526976e/attachment.html>


More information about the Glasgow-haskell-users mailing list