amlug.eth (@realamlug)

amlug.eth @realamlug 2026-11-24T12:28:11.000Z

A while ago I said JavaScript can be as fast as Rust, and got some raised eyebrows. Fair. Here is the work behind that claim, including the parts that aren't there yet. Announcing Perry Three.js (research preview): unmodified three.js from npm, compiled ahead of time into a native binary. No JS engine, no WebView. macOS, Windows, Linux, iOS, iPadOS, tvOS and Android. Our open-source three.js chess game, tuichess, is on the App Store. The store build still renders through Bloom; the fully compiled runtime is next. Compiling three.js was never the hard part. Perry compiles pretty much any program by now. The hard part is speed, and speed hinges on one question: can the compiler prove what a value is, at every point in the program? Where it can, Perry emits the kind of code Rust would: direct loads, direct calls, no runtime lookups, no caches. three.js's Matrix4.multiplyMatrices, instructions per multiply, same machine, same method: Node: 411 Rust, Vec<f64>: 288 Perry: 237 Rust, [f64; 16]: 73 On the same data layout, a heap array with a length, Perry is ahead of Rust. The remaining 3x is mostly Rust knowing the array has exactly 16 elements. That's one more fact to prove. That is the ceiling. A real app isn't there yet. Once the same function sits behind the full web layer (DOM, styles, Proxies), one unknown early on spreads to everything downstream, and the compiler falls back to the generic path: ~6,000 instructions today. Same compiler, same code; the proofs just don't survive the trip yet. We call that the cliff and that is what I am currently working on. This will also be what unlocks performance for all other JS apps. Perry Solver is how we remove it: whole-program analysis that proves facts site by site. Exact or nothing, no heuristics. Where we are today: - Released Perry: 14-20% of sites proven on larger builds - Solver branch: 86% on the same build - One step up the ladder (OrbitControls + a DOM Proxy layer) the cliff is back. Root cause found, fix in progress. - Compile times are 6-12x worse for now. Also on the list. So: not there yet. But the gap is now a number, the number is moving, and everything is open: the source, the test ladder, the misses. If you want to watch a compiler learn to prove JavaScript, follow along. Links in the first reply.

three.js compiled program running natively
20 0 1664 4 0
amlug.eth @realamlug 2026-11-26T20:27:03.000Z

We had Claude (Opus 5.5) build the same small arcade racer six times. In Three.js, that same Three.js game compiled to native, Bloom, a hybrid of the two, a port of a real open-source Three.js project, and Bevy. Same spec, same assets. Bloom won some of it and lost some of it. https://t.co/bdsHReRSUP

12 1 12613 1 2
DoctorGester @DoctorGester 2026-11-27T16:41:53.000Z

@realamlug Haha no, I'm actually planning to release the game. It's all C++ initially ported from threejs where I've hit performance limitations pretty much right away and didn't want to spend any more time hacking things together just to run at 60fps.

0 0 11 1 0
DoctorGester @DoctorGester 2026-11-27T16:35:58.000Z

@realamlug Hilarious. I have a custom game engine fable built in 5h and quite a complicated game with large levels and thousands of physics props and it runs at 120fps on 15 pro with zero tradeoffs like those (just gets hot fast, so realistically 60 is better)

0 0 15 1 0
Yannick Comte @cyannick 2026-11-27T14:36:56.000Z

The question is why 3 web tech and only one native, which is Rust + Bevy. Where is SDL + C/C++?

@realamlug

We had Claude (Opus 5.5) build the same small arcade racer six times. In Three.js, that same Three.js game compiled to native, Bloom, a hybrid of the two, a port of a real open-source Three.js project, and Bevy. Same spec, same assets. Bloom won some of it and lost some of it. https://t.co/bdsHReRSUP

6 0 317 1 0
amlug.eth @realamlug 2026-11-27T13:37:08.000Z

I'm managing 60+ apps across the app stores. To keep track of revenue, downloads, etc. I _used_ to use Appfigures. However, they are charging $1.99 per app. Now, you need to understand that "app" really just means an app in any given app store. So one app available in the Apple App Store, the Play Store, and the Microsoft Store is three apps for them. So my monthly bill is around $200 a month with them _at least_. Enough to build my own solution, and here it is: AppRevenue A few fun facts: - 100% Perry app - $4.99 / month, regardless of how many apps - Apple, Google, Microsoft & Steam - The web app is also a Perry app via WASM - Shareable reports Link in first comment.

8 0 483 5 0
ani @anaisbetts 2026-11-26T23:23:09.000Z

This is C# but y'all don't want to hear that

@mark_k

I'm ready to leave Rust behind. We need a new programming language specifically for AI agents. Strictly typed, many compiler checks, but also with a fast compiler, unlike Rust. Bring it on!

2478 136 196596 166 22
Mark Kretschmann @mark_k 2026-11-26T20:55:33.000Z

I'm ready to leave Rust behind. We need a new programming language specifically for AI agents. Strictly typed, many compiler checks, but also with a fast compiler, unlike Rust. Bring it on!

2216 67 494244 728 87
amlug.eth @realamlug 2026-11-25T06:15:27.000Z

Christian devs, where are you at? Christian gamers, where are you at? I've always believed that the stories of the Bible are a great backbone for games. Until AI, I was never in a position to make any of it happen. So now I'm doing it. Proud to announce "Jonah: The Deep", a cinematic role-play game for the story of Jonah. Made for all ages, kept family-friendly. I'm looking for beta testers/gamers. Naturally, this is written in TypeScript with Perry and Bloom. :)

7 0 201 5 0
Ray @raysan5 2026-11-26T17:10:04.000Z

Key point: if the dev/speaker/teacher/contributor didn't care, I neither care about what I'm being presented... but this dynamic is a road to perdition...

@rfleury

This is the future for games, software, and many other things, unfortunately. I have attended talks with LLM generated slides, and it is effectively exactly like this. Superficially reproducing visually pleasing things, but ultimately noisy & meaningless, which is ironically visually disturbing. Makes it clear that the speaker didn’t care, and so gives me no reason to care either.

367 9 14022 4 0
amlug.eth @realamlug 2026-11-26T20:27:06.000Z

We also compiled three.js's own WebGPU renderer with Perry, unmodified. It works, and the shaders come out identical to Node. But it needs 10 to 12x the CPU per frame, so it's not usable yet. That one is Perry's runtime, so it's on me.

0 0 345 1 0