Ticket #76 (closed task: fixed)

Opened 5 years ago

Last modified 5 years ago

Compilation time is exponential in depth of constructor nesting

Reported by: benl Owned by:
Priority: blocker Milestone: 0.1.3
Component: Source Type Inferencer Version:
Keywords: Cc:

Description (last modified by benl) (diff)

Added by Jared.

Albeit with a very small constant, so you won't notice it until the constructors are nested 7 or 8 deep. The table shows the run times on my computer of a class of functions of the form:

example = ()
  where (Cons v1 (Cons v2 (Cons v3 (Cons v4 xs)))) = []

Depth | Compile time | Normalized time | Log of normalized time
    9 |      123.164 |         121.864 |  4.803
    8 |       31.874 |          30.574 |  3.420
    7 |        9.089 |           7.789 |  2.052
    6 |        3.276 |           1.976 |  0.681
    5 |        1.856 |           0.556 | -0.587
    4 |        1.456 |           0.156 | -1.858
    3 |        1.376 |           0.076 | -2.577

Changes to Shared.VarPrim? seem to have broken this example in another way. I'll leave it as New until I can test it.

Change History

Changed 5 years ago by benl

  • description modified (diff)

Changed 5 years ago by benl

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.