Who is more efficient in execution of JAVA and JS?

After accumulating certain experience in development, I found that many data processing can be processed with JAVA in the background or JS in the foreground. When the amount of data is large, you can't help but wonder: Which is faster in execution efficiency? Under what circumstances is it better to use JAVA/JS?

The specific differences are as follows:
(1)
Java is object-oriented programming
JavaScript is an object-based dao and event-driven explanatory language that can be embedded in Web pages, used to add interactive effects to the page and make the page dynamic .
(2)
Java needs to be pre-compiled, javascript does not need to be pre-compiled, it is interpreted line by line during the running of the program, and interpreted and executed by the browser.
(3) The
definition of variables in java requires the definition of data types, and there is no data type in js, so the assignment shall prevail.

It is obviously unrealistic to leave it to the client when processing a large amount of data.
In terms of this development experience, there are 37,000 pieces of data a day, and it takes about 10 seconds to send to the front desk and process the data into a chart. It takes about 10 seconds on my laptop (4600H), and 13s on my colleague’s tenth-generation low-voltage i3 laptop. the above.
At this time, for customer experience, etc., background processing with front-end AJAX is the best way

Guess you like

Origin blog.csdn.net/Beatingworldline/article/details/113564863