简体   繁体   English

JavaScript 是如何工作的:在 V8 引擎中?

[英]How JavaScript works: inside the V8 engine?

Each Browser has own Engine for JavaScript, so if I want to learn how JavaScript works, I must learn about all the Engines?每个浏览器都有自己的 JavaScript 引擎,所以如果我想了解 JavaScript 的工作原理,我必须了解所有引擎吗?

Do the Engines translate the Code in the same Way?引擎是否以相同的方式翻译代码?

I guess you don't have to unless you want to create enterprise Applications with thousands of users and every millisecond and roundtrip is important for you to safe real money.我想您不必这样做,除非您想创建具有数千名用户的企业应用程序,并且每一毫秒和往返对于您保护真钱都很重要。

Unless you don't want to let your application perform ideal in every single engine.除非您不想让您的应用程序在每个引擎中都表现理想。 We are just talking about milliseconds over here.我们这里只讨论毫秒。

The overall concept over here is the same in every Engine.这里的整体概念在每个引擎中都是相同的。

If you want to dig deeper into the understanding of how the engines process your code i recommend to check out You don't know JS .如果您想更深入地了解引擎如何处理您的代码,我建议您查看You don't know JS It's a book series in 6 parts which you can read online for free.这是一个分为 6 部分的系列丛书,您可以免费在线阅读。

After reading that I personally got a much better idea of how my code is processed by the engine.读完之后,我个人对引擎如何处理我的代码有了更好的了解。 And i'm sure that the part were you need to differ between this engines is all about the performance in the millisecond area!而且我敢肯定,您需要在这些引擎之间进行区分的部分完全是关于毫秒区域的性能!

A brief summary of how the engines differ can be found over here: Guide to JavaScript engines .可以在此处找到有关引擎有何不同的简要摘要: JavaScript 引擎指南 You could also check out the performance guide over here: JavaScript Engine Comparison .您还可以在此处查看性能指南: JavaScript 引擎比较

They have also listet more helpful sources!他们还列出了更多有用的资源!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM