Hi All,

For scalar operations Numpy first try to extract the underlying C value
from a Python Integers. It causes bottleneck because it first converts the
Python scalar into its matching NumPy scalar (e.g. PyLong -> int32) and
then it extracts the C value from the NumPy scalar.

Its quicker to just extract the value directly from the Python scalar. Raul
did it for float but for integers case is different as it get handled by
different OS differently. There are basically two standards for long on 64
bit os, Microsoft uses long = int (32 bits), linux uses long = long long
(64 bits).

Hence, before getting into above mentioned modifications, there is need to
have much test case to ensure behaviour of integer remains same. I have
written fews at pr #3592 <https://github.com/numpy/numpy/pull/3592>

-
Arink
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to