unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mike Gran <spk121@yahoo.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-devel@gnu.org
Subject: Re: `SCM_MAKE_CHAR ()' signedness issue
Date: Mon, 17 Aug 2009 06:05:51 -0700	[thread overview]
Message-ID: <1250514351.18373.33.camel@localhost.localdomain> (raw)
In-Reply-To: <87fxbq6e2j.fsf@gnu.org>

Hi-

On Mon, 2009-08-17 at 10:26 +0200, Ludovic Courtès wrote: 
> Hi,
> 
> Ken Raeburn <raeburn@raeburn.org> writes:
> 
> > On Aug 16, 2009, at 18:13, Ludovic Courtès wrote:
> >>> There's always the inline-function approach, too.
> >>
> >> Unfortunately no, because we're still not assuming `inline' keyword
> >> support from the compiler.
> >
> > Right, but inline.h deals with that; if "inline" isn't supported you
> > just get a declaration and make a function call.  There would be a
> > performance hit from doing the function calls all the time,
> 
> Yes, I'm not sure that's something worth trying.

On my system I ran a test with SCM_MAKE_CHAR as a macro, an an inline,
and as a never inlined function.  I ran ./check-guile twice for each.

SCM_MAKE_CHAR as macro, ./check-guile gives
real 0m22.680s 0m22.658s
user 0m7.700s  0m7.640s
sys 0m1.067s  0m1.124s

SCM scm_i_make_char (scm_t_int32 x) __attribute__((noinline))
real 0m22.010s 0m21.998s
user 0m7.631s  0m7.648s
sys 0m1.151s  0m1.076s

SCM inline scm_i_make_char (scm_t_int32 x)
real 0m22.107s 0m21.914s
user 0m7.614s  0m7.726s
sys 0m1.115s  0m1.068s

The timing differences between them seem to be in the noise, for this
one test.

Thanks,

Mike





  reply	other threads:[~2009-08-17 13:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-15 12:00 `SCM_MAKE_CHAR ()' signedness issue Ludovic Courtès
2009-08-16 21:58 ` Ken Raeburn
2009-08-16 22:13   ` Ludovic Courtès
2009-08-16 22:25     ` Ken Raeburn
2009-08-17  8:26       ` Ludovic Courtès
2009-08-17 13:05         ` Mike Gran [this message]
2009-08-17 15:33           ` Ludovic Courtès
2009-08-18 17:32             ` Mike Gran
  -- strict thread matches above, loose matches on Subject: below --
2009-08-17 18:52 carlo.bramix
2009-08-17 19:41 ` Ken Raeburn
2009-08-18 18:39 carlo.bramix
2009-08-18 18:54 ` Mike Gran
2009-08-18 23:36   ` Greg Troxel

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=1250514351.18373.33.camel@localhost.localdomain \
    --to=spk121@yahoo.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).