New Altivec-optimized valarray implementation

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

    New Altivec-optimized valarray implementation

    I have written a new implemention of the std::valarray library that is
    optimized to use Altivec (Apple's "Velocity Engine", part of the
    PowerPC G4's in most Macintoshes and the announced IBM PPC 970). The
    implementation is mostly standard conforming and is complete.

    As soon as I get my shingle up on the web (1 or 2 day's time), I'll
    post the library and its accompanying docs, which I call "MacSTL".
    Would like comments, tests, discussions of it...

    Preliminary benchmarks on my Power Mac G4 make it 550% faster on
    inlined arithmetic, 1360% faster on inlined transcendentals and 290%
    faster on summation than the gcc 3.1 std::valarray. Even the
    non-Altivec-optimized inline arithmetic is 50% faster than gcc, due to
    ruthless elimination of extrenous loads and stores by using STL-style
    algorithms.

    I sense that std::valarray is somewhat of a dead horse out there, but
    I believe I can show there's still some life left in that concept. As
    for Altivec, it's still up and coming!

    P.S. The library also has several STL-influenced concepts for the Mac
    (or BSD/PowerPC): std::vectors with Mach copy-on-write semantics,
    clean COM wrappers using just std containers, zlib wrapped in std
    iostreams...
  • Ron Natalie

    #2
    Re: New Altivec-optimized valarray implementation


    "Chandra Shekhar Kumar" <chandra.kumar@ oracle.com> wrote in message news:3EF8BA0E.6 2302BAC@oracle. com...[color=blue]
    > i think this is the wrong news-group for yr msg...plzz post it at
    > comp.std.c++
    >[/color]
    Please don't.


    Comment

    • E. Robert Tisdale

      #3
      Re: New Altivec-optimized valarray implementation

      Glen Low wrote:
      [color=blue]
      > I have written a new implementation of the std::valarray library
      > that is optimized to use AltiVec (Apple's "Velocity Engine",[/color]

      AltiVec(tm) is Motorola's trademark
      for the first PowerPC SIMD extension.


      [color=blue]
      > part of the PowerPC G4's in most Macintoshes
      > and the announced IBM PPC 970).
      > The implementation is mostly standard conforming and is complete.[/color]
      [color=blue]
      > As soon as I get my shingle up on the web (1 or 2 day's time),
      > I'll post the library and its accompanying docs,
      > which I call "MacSTL".
      > Would like comments, tests, discussions of it...[/color]
      [color=blue]
      > Preliminary benchmarks on my Power Mac G4 make it 550% faster
      > on inlined arithmetic, 1360% faster on inlined transcendentals
      > and 290% faster on summation than the gcc 3.1 std::valarray.
      > Even the non-Altivec-optimized inline arithmetic
      > is 50% faster than gcc, due to ruthless elimination
      > of extraneous loads and stores by using STL-style algorithms.
      >
      > I sense that std::valarray is somewhat of a dead horse out there but
      > I believe I can show there's still some life left in that concept.
      > As for Altivec, it's still up and coming!
      >
      > P.S. The library also has several STL-influenced concepts for the Mac
      > (or BSD/PowerPC): std::vectors with Mach copy-on-write semantics,
      > clean COM wrappers using just std containers, zlib wrapped in std
      > iostreams...[/color]

      You might want to post this to the Object Oriented Numerics mailing list



      I believe that Kent Budge still subscribes to this list
      and he may appreciate vindication.

      You might also visit the
      High Performance Embedded Computing Software Initiative (HPEC-SI)

      hpec-si.org is your first and best source for information about hpec si. Here you will also find topics relating to issues of general interest. We hope you find what you are looking for!


      They are working on a C++ binding for
      the Vector Signal Image Processing Library (VSIPL)



      There are several implementations of the VSIPL now
      for AltiVec on the PowerPC and you really should be
      benchmarking your implementation of std::valarray against them.

      Also, do you plan an implementation for The Power Mac G5

      The most powerful Mac laptops and desktops ever. Supercharged by Apple silicon. MacBook Air, MacBook Pro, iMac, Mac mini, Mac Studio, and Mac Pro.


      Comment

      • Glen Low

        #4
        Re: New Altivec-optimized valarray implementation

        > You might want to post this to the Object Oriented Numerics mailing list[color=blue]
        >
        > http://www.oonumerics.org/mailman/li....cgi/oon-list/
        >
        > I believe that Kent Budge still subscribes to this list
        > and he may appreciate vindication.[/color]

        I will do that once I get back to my own Mac. Yes, I have seen Kent's
        rationale at the site and I'll be linking to it from my own website,
        once it's up.
        [color=blue]
        > There are several implementations of the VSIPL now
        > for AltiVec on the PowerPC and you really should be
        > benchmarking your implementation of std::valarray against them.[/color]

        I was hoping for a wider audience and thus targetted std::valarray.
        [color=blue]
        > Also, do you plan an implementation for The Power Mac G5
        >
        > http://www.apple.com/powermac/[/color]

        Definitely! I tried to get out my library before the WWDC
        announcement, in the hopes that the rumors were true and get some
        additional publicity. Alas several sleepless nights and time off my
        day job and I only finished it on Monday or so, sans docs which I'm
        working on now.

        I've taken a look at the developer.apple .com site new G5 docs and it
        looks good for what I am doing, especially since Altivec code is
        bandwidth sensitive. For example aligning loops for maximal
        performance would dovetail nicely with my inline implementation. I'll
        have to download the gcc 3.3 compiler that they've provided and see
        how it goes.

        Cheers,
        Glen

        Comment

        Working...