Re: Wow, Python much faster than MatLab
- From: Robert Kern <robert.kern@xxxxxxxxx>
- Date: Sat, 30 Dec 2006 23:30:02 -0500
sturlamolden wrote:
array3[:] = array1[:] + array2[:]
OT, but why are you slicing array1 and array2? All that does is create new array
objects pointing to the same data.
Now for my question: operator overloading is (as shown) not the
solution to efficient scientific computing. It creates serious bloat
where it is undesired. Can NumPy's performance be improved by adding
the array types to the Python language it self? Or are the dynamic
nature of Python preventing this?
Pretty much. Making the array types builtin rather than from a third party
module doesn't really change anything. However, if type inferencing tools like
psyco are taught about numpy arrays like they are already taught about ints,
then one could do make it avoid temporaries.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
.
- References:
- Wow, Python much faster than MatLab
- From: Stef Mientki
- Re: Wow, Python much faster than MatLab
- From: sturlamolden
- Wow, Python much faster than MatLab
- Prev by Date: Re: Wow, Python much faster than MatLab
- Next by Date: Re: Why does Python never add itself to the Windows path?
- Previous by thread: Re: Wow, Python much faster than MatLab
- Next by thread: RE: Wow, Python much faster than MatLab
- Index(es):
Relevant Pages
|