Preliminary benchmarks of C programs compiled to asm.js are usually within a factor of 2 slower than native compilation with Clang. Since asm.js runs in a browser, the performance heavily depends on both the browser and hardware. In the generated code, the variable MEM8 is actually a byte-by-byte "view" of a typed buffer, which serves as the "heap" of the asm.js code. See § Deprecation below.įunction f ( i ) Mozilla Firefox was the first web browser to implement asm.js-specific optimizations, starting with version 22. Performance is improved by limiting language features to those amenable to ahead-of-time optimization and other performance improvements. Intermediate programming language asm.js Designed byĪsm.js is a subset of JavaScript designed to allow computer software written in languages such as C to be run as web applications while maintaining performance characteristics considerably better than standard JavaScript, which is the typical language used for such applications.Īsm.js consists of a strict subset of JavaScript, to which code written in statically-typed languages with manual memory management (such as C) is translated by a source-to-source compiler such as Emscripten (based on LLVM).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |