Re: g_utf8_offset_to_pointer() optimization
- From: Kalle Vahlman <kalle vahlman 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:05:52 +0200
2005/11/3, Luis Menina <liberforce fr st>:
> Ok, I've checked my code and I think you're wrong:
> As I pre-increment the pointer, the first byte is never checked (I
> assume I'm not in the middle of a character). So I'm waiting in this
> case (offset == 1) for the first byte that doesn't match the "10xx xxxx"
> pattern... wich is the case of the null byte !
>
> Offset is then decremented, and everything goes smoothly...
>
> BTW I've tried to use Federico's pango benchmark tools (
> http://primates.ximian.com/~federico/news-2005-10.html#25 ), but i'm
> left with an error...
>
> After the "import cairo" error (solved by installing pycairo) I have
> this error that I can't resolve, as i'm no python guru:
>
> ================
>
> python ./plot-languages.py -o chart.png test1.xml
> Traceback (most recent call last):
> File "./plot-languages.py", line 373, in ?
> main ()
> File "./plot-languages.py", line 367, in main
> rset = ResultSet (file)
> File "./plot-languages.py", line 47, in __init__
> self.parse (filename)
> File "./plot-languages.py", line 63, in parse
> self.parse_language_node (l)
> File "./plot-languages.py", line 78, in parse_language_node
> time = float_from_node (child)
> File "./plot-languages.py", line 32, in float_from_node
> return float (c.nodeValue)
> ValueError: invalid literal for float(): 11,560000
The error is that the plotter didn't set locale and thus doesn't know
you (like I) are not using a dot as your decimal separator, while on
the other hand the profiler does (so the data will have it).
It's fixed in cvs so 'cvs up' should do it.
--
Kalle Vahlman, zuh iki fi
Powered by http://movial.fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]