02.12.2005 Landing g_slice_new()

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 Comments

  1. Posted 03.12.2005 at 01:55 | Permalink

    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. Posted 03.12.2005 at 23:52 | Permalink

    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?

Bad Behavior has blocked 413 access attempts in the last 7 days.