Re: [Tracker] some patches




Le mercredi 13 fÃvrier 2008 Ã 18:09 +0100, Carlos Garnacho a Ãcrit :
Hi!,

This was just a heads up to these three bugs:

#513692 : This one just packs booleans in guints, so it should improve
size in most used structs.

Is it so interesting to save some bytes this way?

In tracker-utils, this patch will replace 25 gbooleans with 25 "uint:1".
If I assume that gboolean is a typedef of gint and that gint uses 4
bytes, this patch will save (25*4)-25 = 75 bytes (perhaps a little bit
more but IMHO not much more because we use pointers everywhere and we
take care of memory allocations).
So we would prefer to write some weird things (using of unsigned int
instead of booleans) to save ~75 bytes?

Another question: why glib does use a typedef of gint instead of a
typedef of "guint:1" for its booleans?

#513691 : a similar improvement to #511788 (already committed) in a
different function.

+       res = g_ptr_array_sized_new (100);

What is "100"?!


Laurent.

#513688 : rewrites a function so it doesn't need so much indentation,
logically it's the same.

These three patches look completely harmless, and I've tested them for
some days, is it ok to commit them?

Regards,
   Carlos

_______________________________________________
tracker-list mailing list
tracker-list gnome org
http://mail.gnome.org/mailman/listinfo/tracker-list

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]