471,349 Members | 1,309 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

SIMD powered Python

Hi!

Is there any I&D ongoing about using SIMD [1] instructions, like SSE
[2], to speed up Python, especially regarding functional features,
like list comprehension, map and reduce, etc.. ?

Best regards,

Hugo Ferreira

--

[1] http://en.wikipedia.org/wiki/SIMD
[2] http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions

Jun 22 '07 #1
4 5552
In <11**********************@i13g2000prf.googlegroups .com>, Bytter wrote:
Is there any I&D ongoing about using SIMD [1] instructions, like SSE
[2], to speed up Python, especially regarding functional features,
like list comprehension, map and reduce, etc.. ?
SIMD instruction sets know about "low level" data types, Python is about
objects. `map()`, `reduce()`, list comprehension work on arbitrary
iterables so how do you expect SIMD instructions handle this? Even simple
lists contain objects and those don't have to be of the same type.

Ciao,
Marc 'BlackJack' Rintsch
Jun 23 '07 #2
Hi...

True... But maybe in NumPy arrays that would be more feasible...?

Cheers.

Hugo Ferreira

Marc 'BlackJack' Rintsch escreveu:
In <11**********************@i13g2000prf.googlegroups .com>, Bytter wrote:
Is there any I&D ongoing about using SIMD [1] instructions, like SSE
[2], to speed up Python, especially regarding functional features,
like list comprehension, map and reduce, etc.. ?

SIMD instruction sets know about "low level" data types, Python is about
objects. `map()`, `reduce()`, list comprehension work on arbitrary
iterables so how do you expect SIMD instructions handle this? Even simple
lists contain objects and those don't have to be of the same type.

Ciao,
Marc 'BlackJack' Rintsch
Jun 23 '07 #3
In <11*********************@u2g2000hsc.googlegroups.c om>, Bytter wrote:
Marc 'BlackJack' Rintsch escreveu:
>In <11**********************@i13g2000prf.googlegroups .com>, Bytter wrote:
Is there any I&D ongoing about using SIMD [1] instructions, like SSE
[2], to speed up Python, especially regarding functional features,
like list comprehension, map and reduce, etc.. ?

SIMD instruction sets know about "low level" data types, Python is about
objects. `map()`, `reduce()`, list comprehension work on arbitrary
iterables so how do you expect SIMD instructions handle this? Even simple
lists contain objects and those don't have to be of the same type.

True... But maybe in NumPy arrays that would be more feasible...?
Yes but that's in external libraries and not in the Python interpreter.
So it won't speed up Python code like list comprehensions but "just" calls
to external functions written in C, Fortran or assembler if those make use
of SIMD instructions.

Ciao,
Marc 'BlackJack' Rintsch
Jun 23 '07 #4
Marc 'BlackJack' Rintsch <bj****@gmx.netwrites:
True... But maybe in NumPy arrays that would be more feasible...?

Yes but that's in external libraries and not in the Python interpreter.
So it won't speed up Python code like list comprehensions but "just" calls
to external functions written in C, Fortran or assembler if those make use
of SIMD instructions.
Right, Python has such poor control over side effects that it has not
much chance of parallelizing stuff like list comprehensions in
general. Maybe there's some chance of doing it for some special cases
with RPython.

See http://www.google.com/search?q="nested+data+parallelism"
for what's happening with some other languages.
Jun 23 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by Ranger West | last post: by
reply views Thread by Terry Reedy | last post: by
4 posts views Thread by Woody Splawn | last post: by
2 posts views Thread by Daniel | last post: by
7 posts views Thread by Alfred | last post: by
reply views Thread by Giovanni Giorgi | last post: by
9 posts views Thread by W. eWatson | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.