Created by Aaron McLeod
Twitter: @agmcleod
http://agmprojects.com
Users tend to play most web games for free.
Aaron, make javascript go faster!
Be smart with your garbage collection
“The asm.js programming model is built around integer and floating-point arithmetic and a virtual heap represented as a typed array”
- ASM.js spec
// HEAP32 is a Int32Array
HEAP32[p >> 2]|0
Emscripten is an LLVM to JavaScript compiler.
struct Point {
int x, y;
}
let Point p;
p.x = 10;
p.y = 50;
let Point *a = &p;
a->x = 20;
const $M = require('memory');
$M.set_memcheck(false);
const $I4 = $M.I4, $U4 = $M.U4;
const $SP = $U4[1] -= 2;
$I4[$SP] = 10;
$I4[$SP + 1] = 50;
var a = $SP;
$I4[a] = 20;
$U4[1] += 2;
My thoughts on Emscripten
http://html5gameengines.com
Aaron McLeod
Twitter: @agmcleod
http://agmprojects.com