[Geany-Devel] Implementing stdlib/glib in Geany
Dimitar Zhekov
dimitar.zhekov at xxxxx
Mon Apr 28 18:30:59 UTC 2014
On Sun, 27 Apr 2014 23:05:46 +0200
Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> Le 27/04/2014 22:28, Pavel Roschin a écrit :
> > I found interesting function in utils.c:
> >
> > gboolean utils_str_equal(const gchar *a, const gchar *b)
> >
> > - GLib has similar g_strcmp0 function since 2.16
>
> Ouch indeed. I just replaced the loop with a strcmp(), which performs
> roughly 5.4 times better (on a 64bits Linux) for dummy average strings.
g_strcmp0() checks for NULL strings, like utils_str_equal().
strcmp() will give you a segfault on NULL argument(s).
--
E-gards: Jimmy
More information about the Devel
mailing list