Back to the tank

Who does the work?

Your browser has 16.7 ms to draw each frame at 60 fps. These bars show how much of that budget one simulation step spends, measured on this machine, right now. JavaScript and WebAssembly run the identical algorithm and produce bit-identical fish.

What the machine actually receives

This is the compiled WebAssembly for the flocking step, in its text form. Every value is on a stack, every read is from a numbered memory address. It is the closest thing to assembly language the web has. The real thing arrives as of binary.

Loading...