STINNER Victor <victor.stin...@gmail.com> added the comment:

Attached patch uses an union to make the compiler warning quiet. It should not 
speed up Python because the function already ensures that the pointer is 
aligned to the size of a long. It may slow down the function, I don't know gcc 
enough to guess exactly the impact on performances.

An alternative is to use __attribute__((__may_alias__)), a GCC specific 
attribute. I don't know the impact on performances of this attribute.

----------
keywords: +patch
nosy: +pitrou
Added file: http://bugs.python.org/file24953/utf16_decoder_union.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14249>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to