[plt-scheme] A Comment on MzScheme Performance vis-a-vis WebApplications
At Thu, 8 Jun 2006 11:19:12 +0100, "Paulo J. Matos" wrote:
> On 08/06/06, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> > At Thu, 8 Jun 2006 02:36:33 -0700, "Chongkai Zhu" wrote:
> > > Even if this is true, Matthew will change mzc
> > > to produce the same compiled code as the JIT compiler.
> >
> > No, they're too different. mzc will stay a Scheme-to-C compiler (as
> > opposed to a bytecode-to-native compiler) for the foreseeable future.
> >
>
> So the current best way to distribute faster code is to distribute the
> code and mzscheme and run it under it?
I think there may be confusion about what "mzc" means here, since the
`mzc' command-line program does so many different things.
To get slower code, run mzc with -e or --extension, which mzc's default
action. The result is a shared library to be loaded into MzScheme with
`load-extension' (or by putting the shared library into the right magic
"compiled" subdirectory). Distributing a mzc-generated shared library
has always been a pain.
When you use `mzc' with --[gui-]exe and --exe-dir, the result uses
bytecode, not code compiled through C, and the code will be JITted when
run. In other words, executables created by mzc will run as they
should.
It's unfortunate that mzc's default mode is now its least useful mode,
but cleaning that up is a task for another day.
Matthew