Speeding up ggc-simple on stage1

Alexandre Oliva oliva@lsd.ic.unicamp.br
Sat Jan 15 17:48:00 GMT 2000

On Jan 15, 2000, Zack Weinberg <zack@wolery.cumb.org> wrote:

> On Sat, Jan 15, 2000 at 05:20:10PM -0800, Mark Mitchell wrote:
>> >>>>> "Alexandre" == Alexandre Oliva <oliva@lsd.ic.unicamp.br> writes:
>> >> I'm all for speeding up the compiler -- but I'm old-fashioned.
>> >> Let's profile first, and attack the hot spots!
Alexandre> But attacking the hot spots is precisely what I'm
Alexandre> doing.  ggc-simple seems to be just too slow.
>> Fair enough.  I think you're right -- the best thing to do is find a
>> way to get page-aligned memory even if doing so is something of a
>> nuisance.  I'm not sure what scheme is best for the system you're on.

> Might it work to call sbrk() directly?

Yes, indeed.  Kaffe uses, in a decreasing order of preference: sbrk,
memalign, valloc and plain malloc.  OTOH, Kaffe doesn't use malloc,
and I fear sbrk may break malloc on some platforms.  Unfortunately, I
can't think of a good test to tell for sure :-(

But, if it worked, it would certainly be better than our current use
of valloc.  But mmap would probably still be preferrable.

I'll play a bit with these ideas tonight.

Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
** I may forward mail about projects to mailing lists; please use them

More information about the Gcc-patches mailing list