Travis Oliphant wrote:
>> Probably the most interesting thing now would be for Travis to review 
>> it, and see whether it makes things easier to handle for the Numeric 
>> scalar types (given the amount of code the patch deleted from the 
>> builtin and standard library data types, hopefully the benefits to 
>> Numeric will be comparable).
> 
> 
> I noticed most of the checks for PyInt where removed in the patch.  If I 
> remember correctly, I left these in for "optimization."   Other than 
> that, I think the patch is great.

You're right - there was a fast path based on PyInt_Check in 
_PyEval_SliceIndex that got lost, which I'll add back in. I'll also add fast 
paths for PyInt_Check to the functions in abstract.c, too.

The other PyInt_Check's (in slot_nb_index and instance_index) were there to 
check that __index__ returned the right thing. The check was still there in 
slot_nb_index, but I'd incorrectly removed it from instance_index. I'll add 
that one back in, too.

Once that's done, I'll update the tracker item and reassign to Tim for a review.

Cheers,
Nick.

> As far as helping with NumPy,  I think it will help to be able to remove 
> special-checks for all the different integer-types.  But, this has not 
> yet been done in the NumPy code.
> 
> -Travis
> 
> 
> 


-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to