ningning (Ningning Xie)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 27 2018, 11:24 AM (11 w, 2 d)

Recent Activity

Mon, Jul 9

ningning retitled D4747: Introduce generalized reflexive coercion (GRefl) from Refactor coercion rule to Introduce generalized reflexive coercion (GRefl).
Mon, Jul 9, 8:27 PM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

update annotations for coercions; rebase on master

Mon, Jul 9, 12:02 AM

Wed, Jul 4

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).
  • Overall changes so far:
    1. Removed Refl r ty and CoherenceCo
    2. 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.
    3. Replaced original Refl Nominal ty with Refl ty.
    4. 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.
    5. 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.
    6. Added a small regression for T9872d (the added number is the allocation of current master on T9872d).
    7. Added note about flatten_exact_fam_app_fully performance in TcFlatten.
  • Performance summary
    1. This patch intends to improve the overall performance about coercions.
    2. It does perform better in all cases under perf/compiler, except T9872b (0.6%), T9872d(3.7%), and T14683(0.02%).
    3. It failed T9872d, thus we added a small regression.
    4. It seems to perform better to compile large packages, e.g. Cabal.
  • TODO
    1. Further analysis of the performance: a step-by-step replay of the refactor following Simon's suggestion.
Wed, Jul 4, 11:12 AM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

add notes for GRefl in TyCoRep, performance issue in TcFlatten, and regression for T9872d

Wed, Jul 4, 10:42 AM

Mon, Jul 2

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).

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.

Mon, Jul 2, 1:44 PM

Fri, Jun 29

ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

try a small trick in homogenise_result

Fri, Jun 29, 1:07 AM

Tue, Jun 26

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).
Tue, Jun 26, 8:57 PM

Sun, Jun 24

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).

After some 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.)

Sun, Jun 24, 4:46 PM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

Some optimizations

Sun, Jun 24, 3:38 PM

Jun 15 2018

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).

Current version adds the Nominal Reflexive Coercion Refl ty :: ty ~n ty.

Jun 15 2018, 8:49 PM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

Add Nominal Refl Coercion

Jun 15 2018, 8:33 PM

Jun 12 2018

ningning added a comment to D4747: Introduce generalized reflexive coercion (GRefl).

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?

Jun 12 2018, 12:18 AM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

address most comments from Richard

Jun 12 2018, 12:05 AM

Jun 9 2018

ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

clean up; add more annotations

Jun 9 2018, 11:32 AM

Jun 8 2018

ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

fix problematic cases according to Simon's comment

Jun 8 2018, 10:07 PM
ningning added inline comments to D4747: Introduce generalized reflexive coercion (GRefl).
Jun 8 2018, 8:07 PM
ningning added inline comments to D4747: Introduce generalized reflexive coercion (GRefl).
Jun 8 2018, 7:58 PM
ningning updated the summary of D4747: Introduce generalized reflexive coercion (GRefl).
Jun 8 2018, 2:39 PM
ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).

Refactor Refl to GRefl

Jun 8 2018, 2:30 PM

May 29 2018

ningning updated the diff for D4747: Introduce generalized reflexive coercion (GRefl).
  • fix some comments
May 29 2018, 3:22 PM
ningning added inline comments to D4747: Introduce generalized reflexive coercion (GRefl).
May 29 2018, 2:05 PM

May 28 2018

ningning created D4747: Introduce generalized reflexive coercion (GRefl).
May 28 2018, 5:04 PM

May 16 2018

ningning updated the diff for D4699: Define MCoercion type.
  • update annotations for MCoercion
May 16 2018, 3:38 PM
ningning updated the summary of D4699: Define MCoercion type.
May 16 2018, 10:57 AM
ningning updated the summary of D4699: Define MCoercion type.
May 16 2018, 10:57 AM
ningning created D4699: Define MCoercion type.
May 16 2018, 9:54 AM