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

Commit

Permalink
Update mlton compile options (#470)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MatthewFluet authored and jonsterling committed Nov 21, 2017
1 parent 43f35b2 commit 8a28561
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion script/mlton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ mlyacc src/redprl/redprl.grm
mllex src/redprl/redprl.lex

mkdir -p bin
mlton -native-live-transfer 0 -verbose 2 -mlb-path-var "LIBS $LIBS" -output bin/redprl src/frontend.mlb
mlton -verbose 2 -polyvariance false -mlb-path-var "LIBS $LIBS" -output bin/redprl src/frontend.mlb
2 changes: 1 addition & 1 deletion script/profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ mlyacc src/redprl/redprl.grm
mllex src/redprl/redprl.lex

mkdir -p bin
mlton -profile time -mlb-path-var "LIBS $LIBS" -output bin/redprl-profile src/frontend.mlb
mlton -profile time -polyvariance false -mlb-path-var "LIBS $LIBS" -output bin/redprl-profile src/frontend.mlb

0 comments on commit 8a28561

Please sign in to comment.