From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Mattias Waldau <mattias.waldau@abc.se>
Cc: caml-list@inria.fr
Subject: Re: OCaml is fast!
Date: Thu, 23 Nov 2000 14:03:36 +0100 [thread overview]
Message-ID: <20001123140336.A13264@pauillac.inria.fr> (raw)
In-Reply-To: <HDEEKOMJILGEIHIMAPCDOELHDKAA.mattias.waldau@abc.se>; from mattias.waldau@abc.se on Wed, Nov 22, 2000 at 10:35:56PM +0100
> or is my benchmark wrong? The speed is incredable, I have a 333 Mhz PII, and
> Ocaml make 50 miljon round trips in the loop per second, that is 6 cycles
> per loop, and in each loop one function call + add + store is done.
>
> Or does the compiler optimize away a lot of my code? The code can be found
> in the end of the file.
The functions nooo_init and nooo_move are small enough to be inlined,
so the loops in test_nooo_speed and test_nooo_speed_2 perform no
function calls. To measure the cost of function calls, you can
disable inlining with the "-inline 0" compiler flag.
Methods are never inlined at point of call, though, because it would
require global program analysis.
One last suggestion: if you use Unix.gettimeofday instead of Unix.time,
you'll get sub-second resolution for the timings.
- Xavier Leroy
prev parent reply other threads:[~2000-11-25 14:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <000601bfe231$082d61d0$210148bf@dylan>
2000-11-21 17:05 ` Camlmake David Brown
2000-11-22 16:55 ` Camlmake David Brown
2000-11-22 21:35 ` OCaml is fast! Mattias Waldau
2000-11-23 13:03 ` Xavier Leroy [this message]
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=20001123140336.A13264@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=mattias.waldau@abc.se \
/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