Maciej Fijalkowski <fij...@gmail.com> added the comment:

For unicode at the very least it's not an improvement at all. With the patch 
mentioned that does encode it's also not an improvement at all. Prove as in 
reason about the function in C and make sure it does not do any conditionals 
depending on the input data. This is much easier than it is in Python.

We did this exercise for PyPy once, just for the sake of it. We looked at 
generated IR and made sure a comparison is not leaking any data.

As far as the function goes right now - I don't know. For now following the 
entire code of long_bitwise is a lot of effort - I genuinely can't say that 
it'll be the same for all numbers of 0-255. Can you? It's easier with low-level 
language simply (And yes, this is one of the few cases where I would argue it 
makes sense to implement something in C :)

----------

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

Reply via email to