How JavaScript Works and node asynchronous I/O

Source: Internet
Author: User

1. What is the JavaScript parsing engine?

In short, the JavaScript parsing engine is a program that can "read" JavaScript code and accurately give the result of the code running. such as Var a=1+2; for static languages (such as Java, C + +, c), called compilers (Compiler)that handle these things, and corresponding to dynamic languages such as JavaScript, are called Interpreters (interpreter) . The difference between the two is summed up in a nutshell: The compiler compiles the source code into another code (such as machine code, or bytecode), and the interpreter directly parses and outputs the result of the code . For example, Firebug's console is a JavaScript interpreter.

V8 (Chrome's JS engine), the design goal is to improve the performance of JS, before running will be JS compiled into local machine code (native machines code), and then to execute the machine code (this speed is much faster), I believe that everyone on the JIT (Just In time compilation) must be a stranger.

2. What is the relationship between the JavaScript parsing engine and ECMAScript?

ECMAScript defines the language standard that the JavaScript engine implements, which is the relationship between the two.

3. What is the relationship between the JavaScript parsing engine and the browser?

The JavaScript engine is one of the components of the browser. Browsers also do a lot of other things, such as parsing pages, rendering pages, cookie management, history, and so on. In general, JavaScript engines are developed by the browser developers themselves.

4.Node implementing asynchronous I/O

node is a C + +-based high-speed JavaScript interpreter that binds the underlying UNIX APIs for processes, files, and network sockets, and also binds the HTTP client and server APIs. In addition to some specially named synchronization methods, node bindings are asynchronous, and the node program is not blocked by default, which means that they often have strong scalability and can effectively handle the load. Because the API is asynchronous, node relies on event handlers, which are typically implemented using nested functions and closures.

How JavaScript Works and node asynchronous I/O

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.