git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] speedup allocation in pack-redundant.c

From
Alex Riesen <raa.lkml@gmail.com>
Date
Nov 22, 2005, 23:46 UTC
Message-ID
<20051122234622.GD2916@steel.home>
In-Reply-To
<4383A053.8020100@etek.chalmers.se>
Lukas Sandström, Tue, Nov 22, 2005 23:48:51 +0100:
Show 13 quoted lines
> >>Subject: [PATCH] speedup allocation in pack-redundant.c
> >>Reuse discarded nodes of llists
> >>Signed-off-by: Alex Riesen <ariesen@harmanbecker.com>
> > 
> > I think making allocation/deallocation to the central place is a
> > good cleanup, but I am not sure about the free-nodes reusing.
> > Does this make difference in real life?  If so, it might be
> > worth doing the slab-like allocation, since free-nodes are very
> > small structure and malloc overhead is not ignorable there.
> > 
> I have done some tests, and unfortunatley I saw approx. zero
> improvement with Alex's patch. (less than 10ms difference when
> total runtime is 1.850s, tested on http://home.arcor.de/fork0/download/idx.tar.gz)

Can I suggest you try it in a really really weird environment? Like Cygwin. And switch some virus scanner on.

> Did someone else notice an improvement?

My test case had over 100k files in it (just don't ask why. Weird environments, weird projects, ...)

> It's a nice idea though. I'll look into doing slab-allocation
> for the fun of it, but I'm not really sure that malloc is the
> bottleneck.

Yes, it usually is not a bottleneck. I think, it just another exception.

Previous: Junio C HamanoNext: Alex Riesen
Message 5 of 10 in “speedup allocation in pack-redundant.c”
  1. speedup allocation in pack-redundant.cAlex Riesen, Nov 22, 2005
  2. Junio C HamanoNov 22, 2005
  3. Lukas SandströmNov 22, 2005
  4. Junio C HamanoNov 22, 2005
  5. Alex RiesenNov 22, 2005
  6. Alex RiesenNov 22, 2005
  7. Lukas SandströmNov 22, 2005
  8. Alex RiesenNov 22, 2005
  9. Lukas SandströmNov 22, 2005
  10. Alex RiesenNov 23, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.