|
|
|
|
|
by general_failure
4244 days ago
|
|
I am no expert on this but if games is the primary target, would it make sense to make some sort of vector(ization) API? Or some tesselator API. It's honestly baffling that we keep away from threads in javascript but do all these optimizations like SIMD which are very minor. I mean practically every CPU out there has multiple cores. Workers don't cut it because they require copying data. |
|
Both of those would be harder, and less general. Game developers are asking for SIMD; they aren't asking for specialized APIs.
> It's honestly baffling that we keep away from threads in javascript but do all these optimizations like SIMD which are very minor. I mean practically every CPU out there has multiple cores. Workers don't cut it because they require copying data.
Threads aren't easy to "just add" to JS. Making a thread-safe GC perform as well as today's highly-optimized single-threaded GCs is hard. And not even counting the engineering effort required, none of the millions of lines of JavaScript out there is thread-safe. Of course we will need a way to do threads eventually, but it's much harder than SIMD.