On Sun, 27 Apr 2014 23:05:46 +0200
Colomban Wendling <lists....@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
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel

Reply via email to