caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Basile STARYNKEVITCH <basile@starynkevitch.net>
Cc: caml-list@yquem.inria.fr
Subject: Re: unboxed scalars - was [Caml-list] caml: camlp4 revised syntax
Date: Sun, 15 Jul 2007 15:16:20 +0200	[thread overview]
Message-ID: <1184505381.22819.43.camel@localhost.localdomain> (raw)
In-Reply-To: <469A082A.70303@starynkevitch.net>

Am Sonntag, den 15.07.2007, 13:42 +0200 schrieb Basile STARYNKEVITCH:
> Besides, I am pretty sure than on current processors, unboxing scalars is probably more a win because of memory & cache 
> issues than because of the additional shift & add required to transform a 2n+1 into n or vice versa. Such ALU operations 
> are very cheap today.

Absolutely. Given that any non-trivial program spends 20-40% of its time
in garbage collection, the net effect is probably positive, i.e. the GC
becomes more faster because of the tagged int representation than the
additional ALU cycles cost. (Any unboxing without tagging will make the
GC algorithm more complex and thus slower.)

You don't see this net effect in too simplistic benchmarks since you
need test programs of certain complexity.

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Phone: +49-6151-153855                  Fax: +49-6151-997714
------------------------------------------------------------


  reply	other threads:[~2007-07-15 13:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.7.1184494090.1020.caml-list@yquem.inria.fr>
2007-07-15 10:48 ` tmp123
2007-07-15 11:42   ` unboxed scalars - was [Caml-list] " Basile STARYNKEVITCH
2007-07-15 13:16     ` Gerd Stolpmann [this message]
2007-07-15 17:50     ` Christophe Raffalli
2007-07-16 16:40   ` Richard Jones
2007-07-17  3:08   ` Jon Harrop
2007-07-21 11:31 ` dml tmp123

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=1184505381.22819.43.camel@localhost.localdomain \
    --to=info@gerd-stolpmann.de \
    --cc=basile@starynkevitch.net \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).