Re: g_utf8_offset_to_pointer benchmark
- From: David Turner <dturner soremo com>
- To: Morten Welinder <mwelinder gmail com>
- Cc: performance-list gnome org
- Subject: Re: g_utf8_offset_to_pointer benchmark
- Date: Thu, 03 Nov 2005 18:49:59 +0100
Not surprisingly, Bedhad's code, just like Hans' ignores alignment
constraints
on non-intel processors.Fixing this is possible with more test cases.
Anyway, I still think that his conclusion is valid, i.e. keep the
current glib code
intact, and fix the users instead.
Regards,
- David Turner
- The FreeType Project (www.freetype.org)
Morten Welinder a écrit :
...
int
main ()
{
(void)behdad_utf8_offset_to_pointer ("xxxxxxxxxx" + 1, 5);
return 0;
}
troll:~> gcc -g -Wall -O2 behdad.c
behdad.c: In function `behdad_utf8_offset_to_pointer':
behdad.c:35: warning: return discards qualifiers from pointer target type
troll:~> ./a.out
Bus Error (core dumped)
troll:~> gdb a.out core
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.6"...
Core was generated by `./a.out'.
Program terminated with signal 10, Bus Error.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/platform/SUNW,Sun-Fire/lib/libc_psr.so.1...done.
#0 behdad_utf8_offset_to_pointer (str=0x10669 "xxxxxxxxx", offset=5)
at behdad.c:19
19 register WORDTYPE w = *ws++;
_______________________________________________
Performance-list mailing list
Performance-list gnome org
http://mail.gnome.org/mailman/listinfo/performance-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]