Re:Apple M1 Ultra Meanings and Consequences
by samwillis on Monday March 14, 2022 @03:18PM
(#30676900)
Message passing without shared memory is slow, having to copy data and maybe even serialise/deserialise it in the process. Message passing where you are just passing a pointer is fast.
Web workers are basically the worst case, you have to serialise your data to and from JSON when passing it to and from a worker. It’s not built for performance. There have been many cases where people have tried to improve performance of their apps by offloading work to a web worker but the added cost of serialisation ultimately made it slower than running on the main thread.
I suspect that rather than 1000 cores we might start to see more levels of cores, and hardware for more things. Already Apple has video encoding support. AI seems an obvious idea and it scales much better than most classical computing.
If I may bring up something that may be more of a wish: I wish that we could give up the idea of shared memory and we could have many more cores that communicated by shared messaging. We are already seeing this spread with webworkers - if it became cheap to create a new thread and computers weren't bottlenecked then maybe more games would use it too.