Simon Marlow simonmar at microsoft.com
Mon Aug 1 08:13:16 EDT 2005

On 31 July 2005 08:10, Bulat Ziganshin wrote:

> can you please say about value of using C-- in GHC? will this
> reduce compile time, increase speed of compiled programs, improve
> portability or make some other effect? would the C-- compile path
> replace asm or C path?

It should reduce compile time compared to compiling via C, though I
suspect it will still be slower than using GHC's built-in native code

It should improve the speed of compiled programs, because C-- will be
using its own, efficient, calling convention.  For example, this will
mean that some arguments can be passed in registers on x86, which we
can't do currently because of a combination of the lack of registers and
limitations in what we can convince gcc to do.

It should improve portability, because there is less work in GHC
required to compile via C-- on a new platform: no mangler to modify, for

Eventually, we hope the registerised via-C path would become redundant.
The unregisterised path is still useful for bootstrapping, given that
more platforms have a C compiler than a C-- compiler (if C-- were to
become ubiquitous, the unregisterised path would become irrelevant too).


More information about the Glasgow-haskell-users mailing list