Uh oh!
There was an error while loading. Please reload this page.
Refactor Generic ToJSON - #524
Conversation
phadej
commented
Mar 19, 2017
There is a performance reason they are separate, ping @RyanGlScott |
RyanGlScott
commented
Mar 19, 2017
phadej
commented
Mar 19, 2017
If I might ask, than would be nice to run benchmark on old GHCs as well, e.g 7.8.4 and 7.10.3 too, would be great that performance doesn't degrade on old compilers dramatically |
Lysxia
commented
Mar 19, 2017
Sure! |
bergmark
commented
Mar 19, 2017
Looks like there are some build errors on older GHC's |
Lysxia
commented
Mar 20, 2017
Here are some benchmarks. One file per GHC version. https://gist.github.com/Lysxia/bb3e6dd68f6121b904363dc48e11da0d
At runtime there are cases where this PR is slower if aeson is not optimized, but faster if it is optimized. For instance: I found one case where the reverse happens: Not sure what's going on yet but I can look into it later. |
@Lysxia what are the base point times, i.e. before the patch? EDIT, Ah I see. confused |
phadej
commented
Mar 20, 2017
Great job anyways, tell if you cannot find a reason for BigRecord digression |
bergmark
commented
Mar 21, 2017
What do you mean by default? when compiling aeson normally fast is off and -02 is used.
So it actually got faster on 8.0.2!? I'm inclined to say that we can limit performance requirements to the latest ghc, do others agree? |
phadej
commented
Mar 21, 2017
@begrmark, I don't care about compilation performance, but run-time performance shouldn't be drastically different on at least three previous major GHC releases (i.e. 7.8.4-8.0.2 atm) |
bergmark
commented
Mar 21, 2017
Oops, I misread the first portion as stating everything got faster on 8.0.2 :) |
Lysxia
commented
Mar 21, 2017
Oops, you are right. I got it confused with the fact that it is turned on by the As for performance there are unfortunately some regressions to investigate, but there is hope that this update will be at least as fast as it is currently. |
Lysxia
commented
Mar 28, 2017
Adding |
bergmark
commented
Mar 28, 2017
Related to inlining: #424 |
It turns out inlining |
Lysxia
commented
Mar 29, 2017
Latest comparison benchmarks, left is before patch, right is after. https://gist.github.com/Lysxia/7ea97543e1821ae7f73758e82d35b6a9 |
This merges the code for
GToEncodingandGToJSONwhich look awfully similar.I decided to keep exposing
GToEncodingandGToJSONwith the original kind as constraint synonyms for backwards compatibility, as they seem to be used in some places for type annotations. I don't think their methods are in use externally however.This will conflict with #522. I guess I'll resolve it depending on whichever gets merged first.