unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Re: GNU Guile branch, master, updated. v2.1.0-158-g3c12fc3
       [not found] <E1S51rM-0007zg-NE@vcs.savannah.gnu.org>
@ 2012-03-08  2:37 ` Mark H Weaver
  2012-03-08  8:58   ` Andy Wingo
  0 siblings, 1 reply; 3+ messages in thread
From: Mark H Weaver @ 2012-03-08  2:37 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

Hi Andy,

> commit 24ea9f9c3abb8d9398df4810b815075593ba67c8
> Author: Andy Wingo <wingo-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
> Date:   Tue Mar 6 22:21:39 2012 +0100
>
>     ports.c: inline get_codepoint
>     
>     * libguile/ports.c (get_codepoint): Add inline keyword.  It showed up
>       high in benchmarks, and it's static, so it's probably important to
>       inline.

It's generally frowned upon nowadays to explicitly ask the C compiler to
inline functions, as modern compilers usually do a better job of
deciding when to inline than we do.  It's not a very small function, and
now there will be two copies of it, maybe more in the future.  The
overhead of calling a static function is extremely low.  Were you able
to measure how much this helps performance?

    Thanks,
      Mark



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GNU Guile branch, master, updated. v2.1.0-158-g3c12fc3
  2012-03-08  2:37 ` GNU Guile branch, master, updated. v2.1.0-158-g3c12fc3 Mark H Weaver
@ 2012-03-08  8:58   ` Andy Wingo
  2012-03-08  9:30     ` David Kastrup
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Wingo @ 2012-03-08  8:58 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guile-devel

Hi,

On Thu 08 Mar 2012 03:37, Mark H Weaver <mhw@netris.org> writes:

>> commit 24ea9f9c3abb8d9398df4810b815075593ba67c8
>> Author: Andy Wingo <wingo-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
>> Date:   Tue Mar 6 22:21:39 2012 +0100
>>
>>     ports.c: inline get_codepoint
>
> It's generally frowned upon nowadays to explicitly ask the C compiler to
> inline functions, as modern compilers usually do a better job of
> deciding when to inline than we do.

This was in response to benchmarking.  In my experience the compiler
usually does a good job but sometimes needs help.  In this case it
helped my benchmark by a percent or so without increasing code size.

Regards,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GNU Guile branch, master, updated. v2.1.0-158-g3c12fc3
  2012-03-08  8:58   ` Andy Wingo
@ 2012-03-08  9:30     ` David Kastrup
  0 siblings, 0 replies; 3+ messages in thread
From: David Kastrup @ 2012-03-08  9:30 UTC (permalink / raw)
  To: guile-devel

Andy Wingo <wingo@pobox.com> writes:

> Hi,
>
> On Thu 08 Mar 2012 03:37, Mark H Weaver <mhw@netris.org> writes:
>
>>> commit 24ea9f9c3abb8d9398df4810b815075593ba67c8
>>> Author: Andy Wingo <wingo@pobox.com>
>>> Date:   Tue Mar 6 22:21:39 2012 +0100
>>>
>>>     ports.c: inline get_codepoint
>>
>> It's generally frowned upon nowadays to explicitly ask the C compiler to
>> inline functions, as modern compilers usually do a better job of
>> deciding when to inline than we do.
>
> This was in response to benchmarking.  In my experience the compiler
> usually does a good job but sometimes needs help.  In this case it
> helped my benchmark by a percent or so without increasing code size.

With your compiler, the current compiler version, and on a particular
platform.

-- 
David Kastrup




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-08  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1S51rM-0007zg-NE@vcs.savannah.gnu.org>
2012-03-08  2:37 ` GNU Guile branch, master, updated. v2.1.0-158-g3c12fc3 Mark H Weaver
2012-03-08  8:58   ` Andy Wingo
2012-03-08  9:30     ` David Kastrup

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).