|
|
|
|
|
by kevinkassimo
2338 days ago
|
|
I remember saw something long time ago that type hints does not really offer much performance benefit here. Also TypeScript types aren't that reliable anyways since you can always @ts-ignore them. Real impact of TS on runtime performance is more or less an encouragement to developers to create objects of similar shapes that are easier to optimize. JITs create "shapes" or "hidden classes" anyways: https://v8.dev/blog/fast-properties . They also do many speculative optimizations. |
|
(TypeScript is not sound.)