15. The computer readable storage medium of claim 13 : the operations further comprising generating, for a particular concurrency primitive from the first set, an optimized concurrency primitive that is more efficient than the particular concurrency primitive and that, upon execution of the optimized concurrency primitive, produces the same result as execution of the particular concurrency primitive, wherein generating the second set of concurrency primitives from the first set of concurrency primitives comprises generating the second set of concurrency primitives from the first set of concurrency primitives and the optimized concurrency primitive.
13. A non-transitory computer readable storage medium storing instructions executable by a data processing apparatus and upon such execution cause the data processing to perform operations comprising: receiving a set of source code for a module that will execute on a plurality of different types of architectures, the set of source code including a first set of concurrency primitives, each concurrency primitive in the first set of concurrency primitives defining a language level construct and allowing concurrent execution of different portions of the module; generating a second set of concurrency primitives from the first set of concurrency primitives, wherein each concurrency primitive in the second set corresponds to one of the concurrency primitives from the first set of concurrency primitives and is different than the corresponding concurrency primitive from the first set of concurrency primitives while maintaining the language level constructs of, and being a lower level representation of, the corresponding concurrency primitive from the first set of concurrency primitives, each concurrency primitive in the second set of concurrency primitives being independent of a plurality of different types of architectures that will execute the module and allowing concurrent execution of different portions of the module; storing each concurrency primitive from the second set of concurrency primitives in a portable executable that retains the language level constructs of the first set of concurrency primitives; transforming each concurrency primitive in the second set of concurrency primitives into a concurrency primitive from a third set of concurrency primitives, each of the concurrency primitives in the third set of concurrency primitives specific to a target architecture from the plurality of different types of architectures and allowing concurrent execution of different portions of the module; storing each of the concurrency primitives in the third set of concurrency primitives in a package specific to the target architecture; receiving a request from a client device for the module; determining that the client device has the target architecture; and providing the package of the third set of concurrency primitives to the client device in response to determining that the client device has the target architecture.