Debian Codegraph @

doc/guide/src/FAQ.adoc

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