Robert Bradshaw, 01.12.2009 08:41:
> On Nov 30, 2009, at 10:41 PM, Stefan Behnel wrote:
>> Coercion from bytes to plain char* is pretty fast, and could be even
>> faster if it's typed (as we could use a None check and a macro in that
>> case).
> 
> (As an asside, ironically, a type check is often just as fast as a  
> None check, as I've noticed elsewhere statically typing things...)

Note that this doesn't apply here, as we currently use a function call to
PyBytes_AsString(). Doing a None check and a macro call to
PyBytes_AS_STRING() is likely a lot faster than that.

Stefan

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to