Since its launch, Portable Native Client (PNaCl) has enabled developers to bring platform-independent native code to the Chrome browser, with near-native performance that includes multi-threading and SIMD vectorization.
The tradeoff inherent in platform-independent native code is the amount of time it takes the PNaCl in-browser translator to compile the pexe into architecture-specific native code—upwards of a minute for larger applications. Mitigations have always been possible, such as using "optlevel":0 in the .nmf manifest or hiding the translation time behind asset download or other user interaction, but these measures only go so far.
Today, we are excited to announce the release of the Subzero fast translator. Subzero is a PNaCl bitcode compiler designed from the ground up to be a blazingly fast translator that produces good code quality. Our tests show that Subzero translates at about 15 times the speed of the default PNaCl translator, and generally produces code quality about 80-90% of the default translator, while also using less memory during translation. For example, a pexe that currently takes two minutes to translate, may now take 10 seconds or less with Subzero.
Subzero is shipping for x86 platforms as of Chrome M50, and ARM support is enabled as of Chrome M51. On these platforms, Subzero is activated when the manifest specifies "optlevel":0 (see
https://developer.chrome.com/native-client/reference/nacl-manifest-format). Subzero can also be tested in M50 for all PNaCl apps (regardless of manifest optlevel) by launching Chrome with the hidden command line flag --force-pnacl-subzero, and in M51 by setting the “Force PNaCl Subzero” option in chrome://flags .
With any new compiler, there is a chance of performance surprises, as well as outright bugs. As such, we invite and encourage PNaCl developers to test their applications with Subzero, as we would like to get more feedback, including any bug reports. It’s easy to test without any server-side changes—simply use Chrome’s force-pnacl-subzero flag as described above. (NOTE: Be sure to clear the browser cache between tests to make sure you’re seeing the effect of first-time translation.)
The PNaCl Subzero Team