AS3 Performance Primitives (AS3PP) is an experimental library geared towards high-performance math, and is losely modeled on the Intel Performance Primitives library. It is intended for use with games in subsystems that are performance-sensitive, such as graphics, physics and networking.

The first variant of the library is implemented as an AIR Native extension using C. In addition to the performance benefits of running as native code, the library makes use of the SSE2 instruction set wherever possible, which means that a lot of computations can be done in parallel (4 at-a-time on most desktops). This being so, this library is targeted mainly at games written for AIR (Windows, OS X, iOS, Android).


class MadBirds {
   public var x : Vector.;
   public var y : Vector.;
   private var birdCount : uint;

   public function updatePositions( movementX:Vector., movementY:Vector. ) : void {
      for( var i : uint = 0; i < birdCount; i++ ) {
         this.x[i] += movementX[i];
         this.y[i] += movementY[i];

//This holds all our birds
var birds : MadBirds = new MadBirds;

//These hold position updates
var movementX : Vector.;
var movementY : Vector.;


//Update every bird's position
birds.updatePositions(movementX, movementY);
Math . URL.