| ▲ | madanparas 4 hours ago | ||||||||||||||||||||||||||||||||||||||||||||||
Perry uses NaN-boxing to preserve TypeScript's dynamic type system at runtime, the same approach as JavaScriptCore. The PERF_ROADMAP is honest about the cost: 1.86x behind Zig on image convolution, with 1.24 billion wasted instructions traced specifically to NaN-box unboxing. You cannot get C-level performance without dropping TypeScript semantics, and dropping them means you are no longer compiling TypeScript. | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | Dylan16807 4 hours ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||||||||
I think you mean you can't get that performance without monomorphization. When you know the types you can... ...wait, I went and looked up that file. "The Three Optimizations That Would Close the Gap" You're presenting the data from there in an extremely misleading way! They in no way need to drop any Typescript semantics to go faster. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||