Hacker News new | ask | show | jobs
by lifthrasiir 875 days ago
Given that a rewrite in C/C++ was not feasible but a substantial optimization was acceptable, would solutions like AssemblyScript have been a good strategy? In the end the answer will greatly depend on the amount and nature of dynamic allocations though.
1 comments

These were all pretty easy optimizations though!
Simple but annoying and error-prone optimizations are not necessarily easy ;-) Alternatively, the author might have been not confident enough about C/C++ that a rewrite is straightforward (a hypothesis from the fact that one's Github profile doesn't have any C/C++ code).
Reusing a couple objects and packing numbers are all things you'd do in a systems language, too, except you'd have a thousand more issues to deal with.