Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / RunningOnSparc.adoc
CommitLineData
7f918cf1
CE
1RunningOnSparc
2==============
3
4MLton runs fine on the Sparc architecture.
5
6== Notes ==
7
8* When compiling for Sparc, MLton targets the 32-bit Sparc
9architecture (i.e., Sparc V8).
10
11* When compiling for Sparc, MLton doesn't support native code
12generation (`-codegen native`). Hence, performance is not as good as
13it might be and compile times are longer. Also, the quality of code
14generated by `gcc` is important. By default, MLton calls `gcc -O1`.
15You can change this by calling MLton with `-cc-opt -O2`. We have seen
16this speed up some programs by as much as 30%, especially those
17involving floating point; however, it can also more than double
18compile times.
19
20* When compiling for Sparc, MLton uses `-align 8` by default. While
21this speeds up reals, it also may increase object sizes. If your
22program does not make significant use of reals, you might see a
23speedup with `-align 4`.
24
25== Known issues ==
26
27* Bootstrapping on the <:RunningOnSparc:Sparc architecture> is so slow
28as to be impractical (many hours on a 500MHz UltraSparc). For this
29reason, we strongly recommend building with a
30<:CrossCompiling:cross compiler>.
31
32== Also see ==
33
34* <:RunningOnSolaris:>