- User Since
- Apr 27 2018, 11:24 AM (42 w, 2 d)
Oct 26 2018
Oct 25 2018
Oct 22 2018
Oct 21 2018
Oct 20 2018
Oct 19 2018
add comments for ty_co_subst
Oct 18 2018
panic in ty_co_subst if covar is not almost devoid
Oct 17 2018
Turns out returning a boolean is a great idea. Now we don't need the accumulator or the scope.
Now the almostDevoidCoVarOfCo returns True if the covar is almost devoid.
refactor of devoid co var
Thanks for the comment! Follow-up revision on other comments incoming.
Oct 10 2018
Oct 9 2018
Looks good to me. Thanks Ryan!
Sep 15 2018
Haddock is not updated properly so the build fails. We should correct
Sep 14 2018
Sep 13 2018
If we want to commit it, we need to deal with submodule properly.
Here I updated submodule to a local commit as a reminder that we need to do that, but I have never updated haddock to match this patch.
Address comments; rebase against master
Sep 11 2018
@goldfire This patch now should have addressed most comments. Main changes include
Clean up the commit tree
final clean up; rebase against master
Sep 3 2018
@goldfire The current implementation should have addressed most comments.
However I have several questions regarding HEq#.
Address most comments: renaming of *_uncheck, correct weird typing rule for forallty, added TyConTyCoBinder, etc
Aug 31 2018
Address many comments: add ASSERTs; add type synonym TyVarBinder; correct UnivTyCoBinders to UnivTyBinder; some simplication of cases
Thanks for the detailed comments! @goldfire
I replied to some comments. Many other comments will be fixed in next diff.
Aug 28 2018
Small Fix (fix parsing errors)
Thanks for the comments! @simonpj All the comments should be fixed in last diff.
add ASSERT for smart constructors for ForAllCo; correct typos/annotations
Aug 25 2018
rebase master; address comments; update submodule haddock
@RyanGlScott Thanks for the quick feedbacks!
Address most comments: adding examples, annotations and notes
Aug 24 2018
@simonpj Thanks for the comments!
@RyanGlScott Thanks for the comment!
Aug 9 2018
Jul 28 2018
Add a test case as suggested by RyanGlScott
Jul 24 2018
Update notation for MCoercion: MRefl as a dot; (MCo g) as g
Jul 17 2018
Jul 9 2018
update annotations for coercions; rebase on master
Jul 4 2018
- Overall changes so far:
- Removed Refl r ty and CoherenceCo
- Introduced Refl ty and GRefl r ty MCoercion
- Refl ty :: ty ~n ty, note that Refl ty is always nominal.
- GRefl r ty MRefl :: ty ~r ty. If r == Nominal, use Refl.
- GRefl r ty (MCo co) :: ty ~r ty |>co.
- Replaced original Refl Nominal ty with Refl ty.
- Given g1 :: s ~r t, to construct s |> g2 ~r t we used CoherenceCo g1 g2. It is now replaced with Sym (GRefl r s g2) ; g1. Similar for s ~ t |> g3.
- It turns out that the explicit patten match in homogenise_result in TcFlatten triggers some optimization of GHC and improves the performance. However it is not useful in master branch.
- Added a small regression for T9872d (the added number is the allocation of current master on T9872d).
- Added note about flatten_exact_fam_app_fully performance in TcFlatten.
- Performance summary
- This patch intends to improve the overall performance about coercions.
- It does perform better in all cases under perf/compiler, except T9872b (0.6%), T9872d(3.7%), and T14683(0.02%).
- It failed T9872d, thus we added a small regression.
- It seems to perform better to compile large packages, e.g. Cabal.
- Further analysis of the performance: a step-by-step replay of the refactor following Simon's suggestion.
add notes for GRefl in TyCoRep, performance issue in TcFlatten, and regression for T9872d
Jul 2 2018
In the last week, by analyzing the comparing the ddump-simpl code, Richard and I captured a simple optimization.
In this last commit I refactored homogenise_result to patten match explicitly on kind_co to distinguish the case when kind_co is a GRefl co and the case when it is not. It improves the performance notably. Specifically, because flatten_args_fast always returns a Refl co, GHC can make use of this information to go directly into the case when kind_co is a GRefl co, which saves lots of allocation.
Jun 29 2018
try a small trick in homogenise_result
Jun 26 2018
Jun 24 2018
After some profiling, experiments, and discussions with Richard, we made some optimizations and got rid of one performance failure.
Unfortunately we still have 3 performance failures, for T9872a, T9872b, and T9872c, with deviation 6.7%, 5.7%, 6.3% respectively.
(latest master itself has deviation 3.5%, 3%, 3.35% on those cases.)
Jun 15 2018
Current version adds the Nominal Reflexive Coercion Refl ty :: ty ~n ty.
Add Nominal Refl Coercion
Jun 12 2018
After several commits (some simplification for the smart constructors, saving bits whenever possible, etc.), we have a better deviation as 8.8%, 8.9%, 8.1%, 10.2%. At least a little bit progress?
address most comments from Richard
Jun 9 2018
clean up; add more annotations
Jun 8 2018
fix problematic cases according to Simon's comment
Refactor Refl to GRefl
May 29 2018
- fix some comments
May 28 2018
May 16 2018
- update annotations for MCoercion