Is JavaScript bad for complex computational tasks?

How bad is it, use JavaScript (CoffeeScript) to implement a heavy computing task.? I am concerned about the optimization problem , where the optimal solution cannot be calculated so quickly.

JavaScript was primarily chosen because visualization is required , and instead of adding the overhead to communicate between the various processes, the solution was to simply implement everything in JavaScript.

I do not see a problem with this, especially when viewing performance tests . But I often get the question: Why is JavaScript on earth?

I would argue as follows: this is an optimization problem, NP-hard . It doesn’t matter how much faster the other language will be , since it only adds a constant coefficient to the runtime - is that true?

+5
source share
4 answers

If JavaScript works for you and meets your needs, do you care what other people think?

One way to answer the question is to compare it with an implementation in a β€œgood” language (your terms, not mine) and see what the difference is.

. "" , . , , .

. JavaScript ; parallelism, JavaScript . ; , , .

, JavaScript , . SO JavaScript, , . , .

, , . , .

? .

+1

( Mozilla JavaScript), , .

http://brendaneich.com/2011/09/capitoljs-rivertrail/

Mozilla, Intel RiverTrail, Intels Parallel JS-JavaScript, (CPU) (GPU ) , ( ).

. JS, :

. , RiverTrail (SSE4), screencast , , . , GPU.

CapitolJS ScreenFlow 35 Parallel 3 2 Sequential.

+2

, , X , Java. , , , . V8 javascript, , , . V8 , : ~ 2x-10x.

, API Workers Javascript. , , .

. , , . , , 1000 . Javascript , . , , . , .

+1

- , . , .

/ javascript, , javascript , , , .

, , , , , , javascript , ( -) . , .

NP-hard , , . NP-hard , , , / . . 2x 10x, - , . , NP- 20 , javascript 10 . 20 200 . , , -, .

+1

All Articles