The Domain of Richard Van Natta

Home|About

More Vanity on Wasm

2025-May-15

Still working on my Webassembly backend, I have a slightly more strenouous app which I'm using as a yardstick for measuring improvements to my compiler's optimization a little snake game. It's almost entirely written in lisp, and, for the sake of benchmarking, written with as little C as feasible. Otherwise the solution would be obvious: rewrite the collision detection in C. It is much, much too slow for what it is, true for native (windows here; linux here) but painfully so for webassembly which, after a bit of elbow grease, is down to a mere ~10x penalty over native.

I hadn't really cared about Vanity's performance before the wasm backend, since despite being atrociously slow, it was functional. But it runs face first into sharp edges of Webassembly, I currently believe it's mostly overuse of indirect calls, and the performance of Vanity on Webassembly is too intolerably bad.

Vanity on Wasm

2025-April-20

I have been working a Wasm backend for my scheme compiler, Vanity, and I have something to show for it. A little pong demo app. It uses SDL2 drawing and the FFI capabilities of vanity.

Copyright 2025 Richard N. Van Natta