[Gossip-dev] [Telepathy] rework of the UI
Robert McQueen
robert.mcqueen at collabora.co.uk
Fri Sep 15 09:57:36 CEST 2006
Eitan Isaacson wrote:
> I'm not sure GQuarks are any more efficient, since we create a new
> GQuark every time, and although I haven't looked, g_str_equal probably
> works the same way anyway.
Actually, quarks are implemented inside GLib with a GHashTable of
strings, so the difference is kinda irrelevant. :) In some bizzaro world
where you have enough parameters for it to matter, GDataList is actually
a linked-list of GQuark/pointer/destroy_notify tuples, so actually would
be less efficient than a GHashTable of the strings directly if you look
up a GQuark each time. If you have a very small number of entries, and
cache the quark values in static variables, a datalist will be faster.
Regards,
Rob
--
Robert McQueen
Director, Collabora Ltd.
More information about the Gossip-dev
mailing list