Re: g_utf8_offset_to_pointer() optimization
- From: Morten Welinder <mwelinder gmail com>
- To: Luis Menina <liberforce fr st>
- Cc: performance-list gnome org
- Subject: Re: g_utf8_offset_to_pointer() optimization
- Date: Thu, 3 Nov 2005 09:41:37 -0500
On 11/2/05, Luis Menina <liberforce fr st> wrote:
> Hanns version is 1.2s on my system, so it blows my best version (3.45s),
> but he doesn't handle endianness... waiting to see the overhead it will
> bring...
Endianess fixes will not cause run-time slowdown -- the constants will just
have to be different.
The code, however, suffers from multiple problems:
* Endianess issues.
* Assumes pointer to different types are laid out in memory the same way.
* Assumes that a character pointer that has been cast (in this case by way of
that union) to a guint32 pointer can be dereferenced.
* Assumes that guin32 is an efficient size to operate on.
M.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]