Re: strange code in gscanner.c
- From: Miroslav Silovic <miro vams com>
- To: Tim Janik <timj gtk org>
- Cc: David Odin <David dindinx org>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: strange code in gscanner.c
- Date: Thu, 28 Mar 2002 11:11:28 +0100
Tim Janik wrote:
i think the direct comparison in question was written for efficiency
reasons. a quick test shows, that, depending on the value of
v_identifier, introducing strcmp() makes the current code from 1.5 to
2.5 times slower, introducing g_strcasecmp() makes the code around
7 times slower.
that's with glibc and -O2, note that glibc can already unfold certain
strcmp() calls, while the comparatively bad performance of g_strcasecmp()
is due to GLib rolling it's own loop.
OK to commit?
nope ;)
I think that the explanation above belongs into the code as a comment. :)
Miro
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]