Live data from Hacker News

Porting to Emscripten

hacks.mozilla.org

11–14 of 14 posts

Re: Porting to Emscripten

#11

This looked like great news until I came to "Heavy use of threads is also going to be a problem since Emscripten doesn't currently support them." Sorry, this is a total showstopper for me. I'll check back when Emscripten actually lets me use more than 1/4 or 1/8 of the CPU.

It already does - just run your code in webworker. I am doing it at https://hashcash.io/

Detection of number of available cores is totally different problem. On the other hand, probably detecting number of cores should not be used in first place..

Re: Porting to Emscripten

#13

This looked like great news until I came to "Heavy use of threads is also going to be a problem since Emscripten doesn't currently support them." Sorry, this is a total showstopper for me. I'll check back when Emscripten actually lets me use more than 1/4 or 1/8 of the CPU.

You can use the other core, but you have to think of them a little like separate machines. They can't share memory, but you can pass messages between them very fast (using JS's underlying Trasferale Objects) If you can use bump/frame allocators those 'messages' can be whole chunks of 'memory'.

Re: Porting to Emscripten

#14

This looked like great news until I came to "Heavy use of threads is also going to be a problem since Emscripten doesn't currently support them." Sorry, this is a total showstopper for me. I'll check back when Emscripten actually lets me use more than 1/4 or 1/8 of the CPU.

According to this document Jukka Jylänki is working on it: https://docs.google.com/spreadsheets/d/t3AwIGGaM-4Z9UZM2jpF6...

Oooh - how did you come across that? I had an idea for a way to do this https://groups.google.com/forum/#!searchin/emscripten-discus...
Post reply on HN