Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

Update mlton compile options #470

Merged
merged 1 commit into from
Nov 21, 2017
Merged

Conversation

MatthewFluet
Copy link
Contributor

@MatthewFluet MatthewFluet commented Nov 21, 2017

Closes #437

MLton's polyvariance optimization duplicates small higher-order
functions.

One (unresolved, though usually not significant) issue is that
polyvariance can duplicate code local to a function, even if it
doesn't depend on the higher-orderness (see
http://www.mlton.org/pipermail/mlton-devel/2002-January/021211.html).
This seems consistent with the discussion at MLton/mlton#196.

@MatthewFluet
Copy link
Contributor Author

There may also be a beneficial impact on the runtime of the resulting bin/redprl. I looked at https://travis-ci.org/RedPRL/sml-redprl/jobs/305363531 (the last TravisCI build of master) and compute the testing runtime as: 541.45 (Travis reported time for ./script/test-${COMPILER}.sh) − 416.15 (MLton reported compile mutator time) − 121.60 (MLton reported compile GC time) = 3.7s (testing time) and at https://travis-ci.org/RedPRL/sml-redprl/jobs/305363531 (the TravisCI build of this PR) and compute the testing runtime as: 35.38 − 27.64 − 5.88 = 1.86s.

Closes RedPRL#437

MLton's `polyvariance` optimization duplicates small higher-order
functions.

One (unresolved, though usually not significant) issue is that
polyvariance can duplicate code local to a function, even if it
doesn't depend on the higher-orderness (see
http://www.mlton.org/pipermail/mlton-devel/2002-January/021211.html).
This seems consistent with the discussion at MLton/mlton#196.
@jonsterling
Copy link
Contributor

@MatthewFluet Wow, cool! Thank you!!

@jonsterling jonsterling merged commit 8a28561 into RedPRL:master Nov 21, 2017
@MatthewFluet
Copy link
Contributor Author

Though, I'm now even more curious to figure out idiom is behaving so badly with polyvariance. Looking again at the TravisCI logs, I see that with polyvariance, 177 assembly files are generated while without polyvariance, only 17 assembly files are generated.

@jonsterling
Copy link
Contributor

I'm really curious about it too...

@MatthewFluet MatthewFluet deleted the mlton-options branch November 22, 2017 17:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why is MLton so slow, again?
2 participants