Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / FAQ.adoc
CommitLineData
7f918cf1
CE
1FAQ
2===
3:toc:
4
5Feel free to ask questions and to update answers by editing this page.
6Since we try to make as much information as possible available on the
7web site and we like to avoid duplication, many of the answers are
8simply links to a web page that answers the question.
9
10== How do you pronounce MLton? ==
11
12<:Pronounce:>
13
14== What SML software has been ported to MLton? ==
15
16<:Libraries:>
17
18== What graphical libraries are available for MLton? ==
19
20<:Libraries:>
21
22== How does MLton's performance compare to other SML compilers and to other languages? ==
23
24MLton has <:Performance:excellent performance>.
25
26== Does MLton treat monomorphic arrays and vectors specially? ==
27
28MLton implements monomorphic arrays and vectors (e.g. `BoolArray`,
29`Word8Vector`) exactly as instantiations of their polymorphic
30counterpart (e.g. `bool array`, `Word8.word vector`). Thus, there is
31no need to use the monomorphic versions except when required to
32interface with the <:BasisLibrary:Basis Library> or for portability
33with other SML implementations.
34
35== Why do I get a Segfault/Bus error in a program that uses `IntInf`/`LargeInt` to calculate numbers with several hundred thousand digits? ==
36
37<:GnuMP:>
38
39== How can I decrease compile-time memory usage? ==
40
41* Compile with `-verbose 3` to find out if the problem is due to an
42SSA optimization pass. If so, compile with ++-disable-pass __pass__++ to
43skip that pass.
44
45* Compile with `@MLton hash-cons 0.5 --`, which will instruct the
46runtime to hash cons the heap every other GC.
47
48* Compile with `-polyvariance false`, which is an undocumented option
49that causes less code duplication.
50
51Also, please <:Contact:> us to let us know the problem to help us
52better understand MLton's limitations.
53
54== How portable is SML code across SML compilers? ==
55
56<:StandardMLPortability:>