From: Mark Hayden <hayden@cs.cornell.edu>
To: caml-list@pauillac.inria.fr
Cc: hayden@cs.cornell.edu
Subject: Caml Light performance tests?
Date: Tue, 12 Mar 1996 00:29:41 -0500 [thread overview]
Message-ID: <199603120529.AAA02769@verdandi.cs.cornell.edu> (raw)
Hi,
I'm fine-tuning a program that compiles with both Caml Light and Caml
Special Light. In doing so, I've made lots of guesses about the relative
performance of different coding styles. I'm thinking of putting together
some performance tests to eliminate my guesswork. As you'll see, I'm not
interested in real application benchmarks, but just the relative costs of,
for instance, iterating over a vector with "do_vect" verses an explicit
"for" loop. I have several questions for the Caml Light community:
* Has anyone else already made such tests? (If so, what
were the results and is the code available?)
* What are the issues for the cases below?
* Are there suggestions for other interesting tests?
thanks,
Mark
options:
Caml Light, CSL-byte, CSL-native
safe & unsafe
architecture (I'm interesting in sparc 20s)
1.
let f = fun x -> ... in
...
do_vect f v
VS
do_vect (fun x -> ... ) v ;
VS
for i = 0 to pred (vect_length v) do
...
done
2.
do_list (fun x -> ... ) l
VS
let rec loop = function
| [] -> ()
| hd::tl -> (
... ;
loop tl
)
in loop l
3.
let g = f x in
for i = 1 to 1000 do
g y
done
VS
for i = 1 to 1000 do
f x y
done
4.
let f () =
if ... then None
else Some ...
in
for i = 1 to 1000 do
match f () with
| None -> ()
| Some x -> ...
done
VS
let f g =
if ... then g ...
in
for i = 1 to 1000 do
f (fun x -> ...)
done
4. cost of calling identity function
5. cost of an additional argument to a function
6. overhead of calling an external C function
7. cost of a let binding (is there any?)
reply other threads:[~1996-03-12 15:38 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=199603120529.AAA02769@verdandi.cs.cornell.edu \
--to=hayden@cs.cornell.edu \
--cc=caml-list@pauillac.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