guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `SCM_MAKE_CHAR ()' signedness issue


From: Mike Gran
Subject: Re: `SCM_MAKE_CHAR ()' signedness issue
Date: Mon, 17 Aug 2009 06:05:51 -0700

Hi-

On Mon, 2009-08-17 at 10:26 +0200, Ludovic Courtès wrote: 
> Hi,
> 
> Ken Raeburn <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]