Thank you very much for your answer. What I wanted to implement is not exactly SIMD but something called DOALL-style parallelism, as in this paper: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5749719&tag=1
1. Is the Worker you mentioned v8::Worker? Could you elaborate on why spawning workers or isolates is prohibitively expensive? 2. If I don't create new Isolates or Workers, and within Crankshaft-generated jitted code, just spawn multiple threads in low-level Hydrogen code within the primary isolate threads, would this work? 3. The paper I attached above used SpiderMonkey as their basis. Would SpiderMonkey be easier to implement multithreading than V8? Thank you. On Tuesday, February 23, 2016 at 4:08:40 AM UTC-5, Yang Guo wrote: > > Javascript does not support threading at all. The language is not thread > safe in many places. The best attempt at multi-threading is via workers. > Each worker has it's own separate heap and are synchronized via messages. > > That being said, spawning a worker or a new isolate just to do SIMD is > prohibitively expensive. Besides, recognizing a loop that is suitable for > SIMD operations is very hard in Javascript, since close to anything can > have side effects. There is a language proposal to address this: > https://docs.google.com/presentation/d/1MY9NHrHmL7ma7C8dyNXvmYNNGgVmmxXk8ZIiQtPlfH4/edit > > Yang > > On Tuesday, February 23, 2016 at 8:34:38 AM UTC+1, Tiny Wings wrote: >> >> About my question: >> This is actually not really much about parallelization; this is rather >> about how to do launch multiple threads in multiple cores within a >> javascript program and make them communicate when needed. >> > -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
