FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-03-2008, 12:41 PM
David Relson
 
Default ccache results [was; checking for.....

On Fri, 2 May 2008 07:10:02 -0400
David Relson wrote:

...[snip]...

> As part of identifying the capabilities and files of your operating
> system (distro) ./configure creates a lot of small programs and
> compiles them. I can see how caching compilation info would help with
> this.

I ran a quick test with ccache and ./configure. Using bogofilter's
configure script (because it was available):

before installing ccache:

3 runs of ./configure averaged 6.07s

... installed ccache ...

next run took 6.5 sec (slower than before)
next 3 runs averaged 4.96s (18.4% better than before)

conclusion: ccache _does_ help ./configure

Regards,

David
--
gentoo-user@lists.gentoo.org mailing list
 
Old 05-03-2008, 01:17 PM
Uwe Thiem
 
Default ccache results [was; checking for.....

On Saturday 03 May 2008, David Relson wrote:
> On Fri, 2 May 2008 07:10:02 -0400
> David Relson wrote:
>
> ...[snip]...
>
> > As part of identifying the capabilities and files of your
> > operating system (distro) ./configure creates a lot of small
> > programs and compiles them. I can see how caching compilation
> > info would help with this.
>
> I ran a quick test with ccache and ./configure. Using bogofilter's
> configure script (because it was available):
>
> before installing ccache:
>
> 3 runs of ./configure averaged 6.07s
>
> ... installed ccache ...
>
> next run took 6.5 sec (slower than before)
> next 3 runs averaged 4.96s (18.4% better than before)

All your configure runs were for the same package, right?

>
> conclusion: ccache _does_ help ./configure

It does not for different packages, AFAIK. And that was the question
of the OP.

Uwe

--
Ignorance killed the cat, sir, curiosity was framed!
--
gentoo-user@lists.gentoo.org mailing list
 
Old 05-03-2008, 04:44 PM
David Relson
 
Default ccache results [was; checking for.....

On Sat, 3 May 2008 14:17:39 +0100
Uwe Thiem wrote:

> On Saturday 03 May 2008, David Relson wrote:
> > On Fri, 2 May 2008 07:10:02 -0400
> > David Relson wrote:
> >
> > ...[snip]...
> >
> > > As part of identifying the capabilities and files of your
> > > operating system (distro) ./configure creates a lot of small
> > > programs and compiles them. I can see how caching compilation
> > > info would help with this.
> >
> > I ran a quick test with ccache and ./configure. Using bogofilter's
> > configure script (because it was available):
> >
> > before installing ccache:
> >
> > 3 runs of ./configure averaged 6.07s
> >
> > ... installed ccache ...
> >
> > next run took 6.5 sec (slower than before)
> > next 3 runs averaged 4.96s (18.4% better than before)
>
> All your configure runs were for the same package, right?

Correct.

> > conclusion: ccache _does_ help ./configure
>
> It does not for different packages, AFAIK. And that was the question
> of the OP.

There _should_ be some effect as there are many operations common
amongst configure scripts, for example determining the name of
the header file defining malloc or determining whether to use bzero or
memset, etc, etc. As with any form of caching the rate of cache hits
will vary depending on load and cache size.
k
--
gentoo-user@lists.gentoo.org mailing list
 
Old 05-03-2008, 05:23 PM
Uwe Thiem
 
Default ccache results [was; checking for.....

On Saturday 03 May 2008, David Relson wrote:
> On Sat, 3 May 2008 14:17:39 +0100
>
> Uwe Thiem wrote:
> > On Saturday 03 May 2008, David Relson wrote:
> > > On Fri, 2 May 2008 07:10:02 -0400
> > > David Relson wrote:
> > >
> > > ...[snip]...
> > >
> > > > As part of identifying the capabilities and files of your
> > > > operating system (distro) ./configure creates a lot of small
> > > > programs and compiles them. I can see how caching
> > > > compilation info would help with this.
> > >
> > > I ran a quick test with ccache and ./configure. Using
> > > bogofilter's configure script (because it was available):
> > >
> > > before installing ccache:
> > >
> > > 3 runs of ./configure averaged 6.07s
> > >
> > > ... installed ccache ...
> > >
> > > next run took 6.5 sec (slower than before)
> > > next 3 runs averaged 4.96s (18.4% better than before)
> >
> > All your configure runs were for the same package, right?
>
> Correct.
>
> > > conclusion: ccache _does_ help ./configure
> >
> > It does not for different packages, AFAIK. And that was the
> > question of the OP.
>
> There _should_ be some effect as there are many operations common
> amongst configure scripts, for example determining the name of
> the header file defining malloc or determining whether to use bzero
> or memset, etc, etc. As with any form of caching the rate of cache
> hits will vary depending on load and cache size.
> k

Disclaimer: I haven't tried this out. It's all speculation. ;-)

There might be a way. If you don't set "ccache" as FEATURE
in /etc/make.conf but mv /usr/bin/ccache to /usr/local/bin/ccache.
Then make the following symlinks:
ln -s /usr/local/bin/ccache /usr/local/bin/gcc
ln -s /usr/local/bin/ccache /usr/local/bin/g++
ln -s /usr/local/bin/ccache /usr/local/bin/cc

Next step: Make sure that /usr/local/bin comes before /usr/bin in your
PATH.

With this setup, every identical test program generated and compiled
by configure may seem to be identical for ccache. As I have said,
haven't tried it.

Anyway, it seems to me that more and more projects switch from
autotools to cmake which is *much* faster than autotools.

Uwe

--
Ignorance killed the cat, sir, curiosity was framed!
--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 10:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org