Skip to content

Optimise replaceAllTypeSynonyms#1162

Merged
paf31 merged 1 commit intopurescript:masterfrom
puffnfresh:perf/replaceAllTypeSynonyms
Jun 12, 2015
Merged

Optimise replaceAllTypeSynonyms#1162
paf31 merged 1 commit intopurescript:masterfrom
puffnfresh:perf/replaceAllTypeSynonyms

Conversation

@puffnfresh
Copy link
Copy Markdown
Contributor

Now does a single Type tree traversal and replacement using a Map,
instead of a traversal per element in the Map.

Criterion numbers:

benchmarking unpatched
time                 33.37 s    (31.62 s .. 37.20 s)
                     0.998 R²   (0.997 R² .. 1.000 R²)
mean                 33.30 s    (32.74 s .. 33.67 s)
std dev              556.4 ms   (0.0 s .. 642.5 ms)
variance introduced by outliers: 19% (moderately inflated)

benchmarking patched
time                 19.63 s    (13.87 s .. 24.89 s)
                     0.990 R²   (0.961 R² .. 1.000 R²)
mean                 19.84 s    (18.75 s .. 20.65 s)
std dev              1.241 s    (0.0 s .. 1.408 s)
variance introduced by outliers: 19% (moderately inflated)

Now does a single Type tree traversal and replacement using a Map,
instead of a traversal per element in the Map.

Criterion numbers:

    benchmarking unpatched
    time                 33.37 s    (31.62 s .. 37.20 s)
                         0.998 R²   (0.997 R² .. 1.000 R²)
    mean                 33.30 s    (32.74 s .. 33.67 s)
    std dev              556.4 ms   (0.0 s .. 642.5 ms)
    variance introduced by outliers: 19% (moderately inflated)

    benchmarking patched
    time                 19.63 s    (13.87 s .. 24.89 s)
                         0.990 R²   (0.961 R² .. 1.000 R²)
    mean                 19.84 s    (18.75 s .. 20.65 s)
    std dev              1.241 s    (0.0 s .. 1.408 s)
    variance introduced by outliers: 19% (moderately inflated)
@paf31
Copy link
Copy Markdown
Contributor

paf31 commented Jun 12, 2015

Very nice!

paf31 added a commit that referenced this pull request Jun 12, 2015
@paf31 paf31 merged commit e022dc3 into purescript:master Jun 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants