Thanks for everyone's help, I'll look into those links matti.
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python
Hi Andrew,
I have no clue what future versions of Python will do, but on my setup
there is no optimization done on this (I have taken arrays as float32, just
to show the differences better):
In [19]: N = 10
In [20]: x0 = numpy.random.uniform(size=(N, )).astype(numpy.float32)
In [21]: h = numpy.ra
The current CPython 3.13 version only has (as far as I know) two types
of code-rewriting optimizations:
- a rudimentary JIT[1] that replaces byte code with machine code,
without changing semantics
- a specializer[2] that will take things like a + b, and simplify the
byte code if both a and b are kn
>
> Wow, that would be a pretty serious optimization bug to override Kahan
> summation. Are you speaking of some theoretical future version of the
> interpreter, or of the current state of things?
>
I just wanted to know how the current interpreter worked.
_
On Fri, 20 Dec 2024 at 18:23, Andrew Nelson wrote:
> Wow, that would be a pretty serious optimization bug to override Kahan
>> summation. Are you speaking of some theoretical future version of the
>> interpreter, or of the current state of things?
>>
>
> I just wanted to know how the current inte
On Fri, Dec 20, 2024 at 4:48 AM Andrew Nelson via NumPy-Discussion
wrote:
>
> Or is there a risk that the Python interpreter would prematurely optimize
> that to give:
>
> ```
> dx = h
> ```
>
>
> --
> _
> Dr. Andrew Nelson
Wow, that would be a pretty seriou