Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 921315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:51:19+00:00 2026-05-15T18:51:19+00:00

For use with a class I’ll be teaching, I’m looking for a fast compiler

  • 0

For use with a class I’ll be teaching, I’m looking for a fast compiler or bytecode interpreter for Standard ML. I’m looking for fast compile times; any reasonable run time will do. Bonus if the compilation model is simple and clear. Students in the class will also be using MLton to generate good binaries, but MLton is slow to compile and there are times when students need something they can interact with.

Here’s what I know already:

  • Standard ML of New Jersey has an interactive read-eval-print-loop, but its compilation rules are a bit strange, and it’s a bit slow. Still, it may be the leading contender.

  • Moscow ML used to be ideal, but it still has not been brought up to date with the 2004 Standard Basis Library. Most unfortunate, because in addition to its many other fine properties, Moscow ML also has an interactive help system—but I can’t inflict on my students a compiler whose libraries do something different from what all the online documentation says.

  • Poly/ML might well fit the bill, except that looking at the documentation online, I can’t figure out how to get it to compile. That might be OK.

At the moment it looks as if either SML/NJ or Poly/ML would be the best compromise. It has been many years since I did any serious work in Standard ML, and I would welcome information about other compilers or which of these alternatives is, in your experience, the fastest to interact and the easiest to learn to use.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:51:20+00:00Added an answer on May 15, 2026 at 6:51 pm

    Poly/ML seems to be a little faster than SML/NJ. For example, compiling HaMLet (approx. 25850 lines of commented SML) with Poly/ML, SML/NJ, and MLton, I get the following:

    [mtf@fenrir hamlet-1.3.1.polyml]$ /usr/bin/time make with-poly
    ...
            2.92 real         2.31 user         0.55 sys
    [mtf@fenrir hamlet-1.3.1.smlnj]$ /usr/bin/time make with-smlnj
    ...
           11.98 real        11.08 user         0.78 sys
    [mtf@fenrir hamlet-1.3.1.mlton]$ /usr/bin/time make with-mlton
    ...
           24.51 real        21.04 user         3.05 sys
    

    The difference between Poly/ML and SML/NJ isn’t quite as pronounced when compiling MLton (approx. 175779 lines of commented SML):

    [mtf@fenrir mlton.polyml]$ /usr/bin/time make polyml-mlton
    ...
          117.67 real       112.12 user         4.87 sys
    [mtf@fenrir mlton.smlnj]$ /usr/bin/time make smlnj-mlton
    ...
          123.31 real       116.24 user         6.38 sys
    [mtf@fenrir mlton.mlton]$ /usr/bin/time make mlton-compile
    ...
          238.44 real       232.01 user         5.49 sys
    

    As REPLs, Poly/ML and SML/NJ are nearly equivalent. I find the error messages from SML/NJ to be a little bit better; they tend to have more specific source locations. Of course, when used as a REPL, SML/NJ’s source locations are in terms of stdIn, for which line numbers aren’t terribly helpful.

    If your students are only ever going to use the REPL or compile single-file programs, then I would imagine that either Poly/ML or SML/NJ would serve your purposes. Both provide the SML use function. Multi-file programs are probably best served by SML/NJ’s Compilation Manager or MLton’s ML Basis System; Poly/ML provides yet another compilation system (PolyML.make), but I’ve never used it.

    What difficulties do you have with compiling Poly/ML? Since version 5.0, Poly/ML has supported a simple ./configure ; make ; make install build. Using Poly/ML 5.X to compile a standalone executable requires using PolyML.export and invoking a C compiler, but is fairly well described in the version 5.0 release notes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Use case: class MyTask(Task): queue = 'default_queue' def run(self): # do work Normally I
I create many times I use class DataBuffer in many places in code, so
In CSS we can use both ID and class. is there any pros and
When I use class dump z, I don't get any header files, all I
I'm trying to use class as a key of standard map structure. The usage
1) If I use the following Class.forName() is called multiple times, will it cause
I use class from How to support Arabic text in Android? to show Arabic
I am trying to use Class::DBI with Catalyst::Plugin::Authentication::Store::DBIC. The example given on CPAN does
I have to use class Matrix4x4 from some 3rd party library, and I need
How to decide when to use object adapter and when to use class adapter?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.