3 ms·
They do have a lot to do with concurrency, which is often what threads are used for. They do have limitations to fit in with the JavaScript model. JavaScript i
by astrodust 10y ago
They do have a lot to do with concurrency, which is often what threads are used for. They do have limitations to fit in with the JavaScript model.
JavaScript is generally a lot better at compute intensive tasks than contemporaries like Ruby, Python, PHP and Perl due to the incredible performance of the V8 engine and others like it. The language is ugly, but it's more easily optimized by the JIT compiler.
If you're arguing JavaScript isn't as good as C++ or C, sure, it isn't, but few languages are, and none of those are frequently used for general-purpose web development.
- fiedzia 10y ago> If you're arguing JavaScript isn't as good as C++ or C, sure, it isn't, but few languages are, and none of those are frequently used for general-purpose web development. Java and Go work just fine here and both are used for webdevelopment. My point is that js in not suitable for many cpu-bound operations and neither webworkers nor multiple processes are enough to help it with that. In the browser you don't have other option, but on the server you can (and in practice people do) use other languages like java or go (not to mention C/C++). This is were things like image processing or full-text search goes.