On Aug 4, 2008, at 6:50 AM, Dag Sverre Seljebotn wrote:

> If we make positive int literals unsigned long rather than plain long,
> constant-index buffer lookups are going to be optimized for free. Is
> there going to be any ill side-effects from doing this?
>
> (If not, I can always special-case int literals used for buffer  
> lookups.)

As Carl Witty pointed out, arithmetic between signed an unsigned  
types results in unsigned types, so (1) that means literals will  
definitely not be unsigned and (2) we don't need them to be. (To get  
an unsigned literal, do 1u).

- Robert

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

Reply via email to