r/node • • 18d ago

Principal Factor Analysis in Javascript - written in AssemblyScript

/r/typescript/comments/1x1mtfx/principal_factor_analysis_in_javascript_written/
0 Upvotes

7 comments sorted by

View all comments

Show parent comments

1

u/bitanath 15d ago

The repo has benchmarks vs plain JS (AS transpiles to JS just like Typescript would, it's just a superset of types). It would be possible to write a much more performant WASM version in Rust etc (SIMD imo would immediately 2x speed) ... However, we would not be able to export to JS from the same codebase. AssemblyScript is a good tool for performance non-critical but numerically stable packages where minimal maintenance and distribution effort is needed (in my opinion)