SIMD powered Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bytter

    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

  • Marc 'BlackJack' Rintsch

    #2
    Re: SIMD powered Python

    In <1182554657.444 684.268050@i13g 2000prf.googleg roups.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

    Comment

    • Bytter

      #3
      Re: SIMD powered Python

      Hi...

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

      Cheers.

      Hugo Ferreira

      Marc 'BlackJack' Rintsch escreveu:
      In <1182554657.444 684.268050@i13g 2000prf.googleg roups.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

      Comment

      • Marc 'BlackJack' Rintsch

        #4
        Re: SIMD powered Python

        In <1182607699.214 626.85230@u2g20 00hsc.googlegro ups.com>, Bytter wrote:
        Marc 'BlackJack' Rintsch escreveu:
        >In <1182554657.444 684.268050@i13g 2000prf.googleg roups.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

        Comment

        • Paul Rubin

          #5
          Re: SIMD powered Python

          Marc 'BlackJack' Rintsch <bj_666@gmx.net writes:
          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="neste d+data+parallel ism"
          for what's happening with some other languages.

          Comment

          Working...