Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jason Smith <JNS28@student.canterbury.ac.nz>
To: caml-list@inria.fr
Subject: [Caml-list] compiler implementation of partial applications.
Date: Tue, 10 Feb 2004 00:54:38 +1300	[thread overview]
Message-ID: <4023E9EE@webmail> (raw)

Hi All

I'm investigating certain compile time optimizations using type information. 
One in particular is reducing the runtime costs with calling polymorphic 
functions. My experience so far has mostly been with the internals of the ghc 
compiler and a language called Mondrian. The ghc compiler performs a runtime 
argument count check and generates a special closure called a PAP which 
consumes the appropriate no. of arguments.  Ideally this should be eliminated 
and appropriate transformations performed statically.

In particular I'm looking at how the following simplified example is compiled.

f1 = \a -> \b -> a + b;
f2 = \a -> + a;

map (if (..) then f1 else f2) [1, 2, 3];

I was wondering if you could either, a) point me to some resources which 
discuss ocaml's compilation model with reference to the above, or b) maybe 
comment on it urself?

Thankyou for your time.

Jason.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


                 reply	other threads:[~2004-02-09 11:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4023E9EE@webmail \
    --to=jns28@student.canterbury.ac.nz \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox