Dec 022005
 

I finally managed to finish up the new g_slice_*() allocator for GLib CVS and commit it. For most platforms, it should be a lot faster than malloc(), and on my machine it saves 20-30% in performance over allocating with mem-chunks. But most importantly, it does share equally sized chunks across a program, which mem-chunks didn’t, so they opened up several independent heaps of equally sized chunks, scattered all over the program and causing large wastage.
I would like to thank Matthias Clasen for an initial version of the magazine cache and Stefan Westerfeld for helping me with optimizing the common code paths.

  2 Responses to “02.12.2005 Landing g_slice_new()”

  1. Are there any real-world situations where this will result in a noticable performance increase? I’m thinking of things like startup/shutdown of application X, displaying a really large directory in nautilus, showing the open dialog and other actions that currently take far to long.

  2. Those results are brilliant :) I’d guess this would be an ideal allocator to use for allocating private object data, which should see app startup time implications. Are there any plans to use this in g_object_new?

 Leave a Reply

(required)

(required, will not be published)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>