コンテンツにスキップ

「JavaScriptエンジン」の版間の差分

出典: フリー百科事典『ウィキペディア(Wikipedia)』
削除された内容 追加された内容
Cewbot (会話 | 投稿記録)
Cewbot (会話 | 投稿記録)
13行目: 13行目:
最初のモダンなJavaScriptエンジンは、[[Google]]が[[Google Chrome]] ([[Chromium]]) のために作成した[[V8 (JavaScriptエンジン)|V8]]である。V8は2008年にChromeの一部として登場し、それ以前のどのエンジンよりも遥かに優れた性能であった<ref>{{cite web|url=https://www.cnet.com/news/speed-test-google-chrome-beats-firefox-ie-safari/|title=Speed test: Google Chrome beats Firefox, IE, Safari |last=Shankland |first=Stephen |work=CNET Business Tech|date=2008-09-02|publisher=CBS Interactive |accessdate=2019-11-09}}</ref><ref>{{cite web|url=https://www.pcgameshardware.de/Tools-Software-156186/Tests/Internet-browser-tested-with-Peacekeeper-Sunspider-and-Acid-687738/|title=Big browser comparison test: Internet Explorer vs. Firefox, Opera, Safari and Chrome|work=PC Games Hardware|publisher=Computec Media AG|accessdate=2019-11-09}}</ref><ref>{{cite web|url=https://lifehacker.com/lifehacker-speed-tests-safari-4-chrome-2-and-more-5286869|title=Lifehacker Speed Tests: Safari 4, Chrome 2|publisher=[[Lifehacker]]|accessdate=2019-11-09}}</ref>。V8はJITコンパイルを採用したことが革新的であり、これによって実行時間を大幅に改善することができる。
最初のモダンなJavaScriptエンジンは、[[Google]]が[[Google Chrome]] ([[Chromium]]) のために作成した[[V8 (JavaScriptエンジン)|V8]]である。V8は2008年にChromeの一部として登場し、それ以前のどのエンジンよりも遥かに優れた性能であった<ref>{{cite web|url=https://www.cnet.com/news/speed-test-google-chrome-beats-firefox-ie-safari/|title=Speed test: Google Chrome beats Firefox, IE, Safari |last=Shankland |first=Stephen |work=CNET Business Tech|date=2008-09-02|publisher=CBS Interactive |accessdate=2019-11-09}}</ref><ref>{{cite web|url=https://www.pcgameshardware.de/Tools-Software-156186/Tests/Internet-browser-tested-with-Peacekeeper-Sunspider-and-Acid-687738/|title=Big browser comparison test: Internet Explorer vs. Firefox, Opera, Safari and Chrome|work=PC Games Hardware|publisher=Computec Media AG|accessdate=2019-11-09}}</ref><ref>{{cite web|url=https://lifehacker.com/lifehacker-speed-tests-safari-4-chrome-2-and-more-5286869|title=Lifehacker Speed Tests: Safari 4, Chrome 2|publisher=[[Lifehacker]]|accessdate=2019-11-09}}</ref>。V8はJITコンパイルを採用したことが革新的であり、これによって実行時間を大幅に改善することができる。


V8との競争のために、他のブラウザベンダーはインタプリタをオーバーホールする必要があった<ref>{{cite web |title=Mozilla asks, 'Are we fast yet?' |url=https://www.wired.com/2010/09/mozilla-asks-are-we-fast-yet/ |website=Wired |accessdate=2019-01-18}}</ref>。[[アップル (企業)|Apple]]は[[Safari]]向けに[[Nitro]]を開発した。このエンジンは以前のエンジンより30%優れた性能を示した<ref>{{cite web|title=Apple Releases Safari 5|url=https://www.prnewswire.com/news-releases/apple-releases-safari-5-95817479.html|publisher=Cision PR Newswire|date=2010-06-07|accessdate=2019-11-09}}</ref>。[[Mozilla]]はNitroを部分的に活用して、[[SpiderMonkey]]を改良した<ref>{{cite web|url=https://www.cnet.com/news/opera-10-5-brings-new-javascript-engine/ |title=Opera 10.5 brings new JavaScript engine |last=Shankland |first=Stephen |date=2010-03-02 |work=CNET |publisher=CBS Interactive |accessdate=2019-11-09}}</ref>。[[Opera]]はインタプリタをCarakanに置き換えた。このエンジンは場合によっては従来より2倍高速であった<ref>{{cite web |url=https://www.cnet.com/news/need-for-speed-spurs-opera-javascript-overhaul/ |title=Need for speed spurs Opera JavaScript overhaul |last=Shankland |first=Stephen |date=2009-02-05 |work=[[CNET]] |publisher=CBS Interactive|accessdate=2019-11-09}}</ref>。
V8との競争のために、他のブラウザベンダーはインタプリタをオーバーホールする必要があった<ref>{{cite web |title=Mozilla asks, 'Are we fast yet?' |url=https://www.wired.com/2010/09/mozilla-asks-are-we-fast-yet/ |website=Wired |accessdate=2019-01-18}}</ref>。[[Apple]]は[[Safari]]向けに[[Nitro]]を開発した。このエンジンは以前のエンジンより30%優れた性能を示した<ref>{{cite web|title=Apple Releases Safari 5|url=https://www.prnewswire.com/news-releases/apple-releases-safari-5-95817479.html|publisher=Cision PR Newswire|date=2010-06-07|accessdate=2019-11-09}}</ref>。[[Mozilla]]はNitroを部分的に活用して、[[SpiderMonkey]]を改良した<ref>{{cite web|url=https://www.cnet.com/news/opera-10-5-brings-new-javascript-engine/ |title=Opera 10.5 brings new JavaScript engine |last=Shankland |first=Stephen |date=2010-03-02 |work=CNET |publisher=CBS Interactive |accessdate=2019-11-09}}</ref>。[[Opera]]はインタプリタをCarakanに置き換えた。このエンジンは場合によっては従来より2倍高速であった<ref>{{cite web |url=https://www.cnet.com/news/need-for-speed-spurs-opera-javascript-overhaul/ |title=Need for speed spurs Opera JavaScript overhaul |last=Shankland |first=Stephen |date=2009-02-05 |work=[[CNET]] |publisher=CBS Interactive|accessdate=2019-11-09}}</ref>。


2017年から、主要ブラウザが[[WebAssembly]]に対応するようになり、性能が重要となる部分で事前にコンパイルされた[[実行ファイル]]を使用できるようになった。JavaScriptエンジンは通常のJavaScriptのコードと同じ[[サンドボックス (セキュリティ)|サンドボックス]]でWebAssemblyのコードを実行する。
2017年から、主要ブラウザが[[WebAssembly]]に対応するようになり、性能が重要となる部分で事前にコンパイルされた[[実行ファイル]]を使用できるようになった。JavaScriptエンジンは通常のJavaScriptのコードと同じ[[サンドボックス (セキュリティ)|サンドボックス]]でWebAssemblyのコードを実行する。
21行目: 21行目:
* [[V8 (JavaScriptエンジン)|V8]] - [[Google]]によって開発された最も使用されているJavaScriptエンジンで、[[Google Chrome]]などの[[Chromium]]ベースのブラウザで使用されている。また、{{仮リンク|Chromium Embedded Framework|label=CEF|en|Chromium Embedded Framework}}や[[Electron (ソフトウェア)]]などのChromiumが組み込まれている[[ソフトウェアフレームワーク]]によって構築されている[[アプリケーションソフトウェア|アプリケーション]]でも使用されている。その他の使用例としては、[[Node.js]][[ランタイムシステム]]が含まれている。
* [[V8 (JavaScriptエンジン)|V8]] - [[Google]]によって開発された最も使用されているJavaScriptエンジンで、[[Google Chrome]]などの[[Chromium]]ベースのブラウザで使用されている。また、{{仮リンク|Chromium Embedded Framework|label=CEF|en|Chromium Embedded Framework}}や[[Electron (ソフトウェア)]]などのChromiumが組み込まれている[[ソフトウェアフレームワーク]]によって構築されている[[アプリケーションソフトウェア|アプリケーション]]でも使用されている。その他の使用例としては、[[Node.js]][[ランタイムシステム]]が含まれている。
* [[SpiderMonkey]] - [[Mozilla]]によって[[Firefox]]と[[フォーク (ソフトウェア開発)|派生物]]向けに開発された。[[GNOME Shell]]での拡張機能の対応のためにも使用されている。
* [[SpiderMonkey]] - [[Mozilla]]によって[[Firefox]]と[[フォーク (ソフトウェア開発)|派生物]]向けに開発された。[[GNOME Shell]]での拡張機能の対応のためにも使用されている。
* [[WebKit#JavaScriptCore|JavaScriptCore]] - [[アップル (企業)|Apple]]の[[Safari]]向けのエンジンであり、その他の[[WebKit]]ベースのブラウザでも使用されている。[[KDE]]の[[KJS]]がベースとなっている<ref>{{cite web |url=https://trac.webkit.org/wiki/Companies%20and%20Organizations%20that%20have%20contributed%20to%20WebKit |title=Companies and Organizations that have contributed to WebKit |last=Stachowiak |first=Maciej |date=2008-11-09 |work=WebKit Wiki |access-date=2019-04-13}}</ref>。
* [[WebKit#JavaScriptCore|JavaScriptCore]] - [[Apple]]の[[Safari]]向けのエンジンであり、その他の[[WebKit]]ベースのブラウザでも使用されている。[[KDE]]の[[KJS]]がベースとなっている<ref>{{cite web |url=https://trac.webkit.org/wiki/Companies%20and%20Organizations%20that%20have%20contributed%20to%20WebKit |title=Companies and Organizations that have contributed to WebKit |last=Stachowiak |first=Maciej |date=2008-11-09 |work=WebKit Wiki |access-date=2019-04-13}}</ref>。
* [[Chakra]] - [[Microsoft Edge]]のエンジンであり、[[Internet Explorer]]の同名のエンジンからフォークした。[[Microsoft]]はEdgeをChromiumベースとして再開発しており<ref>{{citation |url=https://blogs.windows.com/windowsexperience/2018/12/06/microsoft-edge-making-the-web-better-through-more-open-source-collaboration |title=Microsoft Edge: Making the web better through more open source collaboration |publisher=Microsoft |first=Joe |last=Belfiore |date=2018-12-06}}</ref><ref>{{cite web |url=https://github.com/MicrosoftEdge/MSEdge/blob/7d69268e85e198cee1c2b452d888ac5b9e5995ca/README.md |title=Microsoft Edge and Chromium Open Source: Our Intent |date=2018-12-06 |publisher=Microsoft Edge Team |accessdate=2018-12-08}}</ref>、これによりV8を使用するように変更される。Internet Explorerでは引き続きChakraが使用される。
* [[Chakra]] - [[Microsoft Edge]]のエンジンであり、[[Internet Explorer]]の同名のエンジンからフォークした。[[Microsoft]]はEdgeをChromiumベースとして再開発しており<ref>{{citation |url=https://blogs.windows.com/windowsexperience/2018/12/06/microsoft-edge-making-the-web-better-through-more-open-source-collaboration |title=Microsoft Edge: Making the web better through more open source collaboration |publisher=Microsoft |first=Joe |last=Belfiore |date=2018-12-06}}</ref><ref>{{cite web |url=https://github.com/MicrosoftEdge/MSEdge/blob/7d69268e85e198cee1c2b452d888ac5b9e5995ca/README.md |title=Microsoft Edge and Chromium Open Source: Our Intent |date=2018-12-06 |publisher=Microsoft Edge Team |accessdate=2018-12-08}}</ref>、これによりV8を使用するように変更される。Internet Explorerでは引き続きChakraが使用される。
* [[React Native|Hermes]] - [[Facebook]]が開発したエンジンであり、[[React Native]]を使用する[[Android (オペレーティングシステム)|Android]][[モバイルアプリケーション|アプリ]]向けに最適化されている<ref>{{citation|url=https://www.zdnet.com/article/facebook-just-released-a-new-open-source-javascript-engine/|title=Facebook just released this new open source JavaScript engine|publisher=ZDNet|first=Liam|last=Tung|date=2019-07-12}}</ref>。
* [[React Native|Hermes]] - [[Facebook]]が開発したエンジンであり、[[React Native]]を使用する[[Android (オペレーティングシステム)|Android]][[モバイルアプリケーション|アプリ]]向けに最適化されている<ref>{{citation|url=https://www.zdnet.com/article/facebook-just-released-a-new-open-source-javascript-engine/|title=Facebook just released this new open source JavaScript engine|publisher=ZDNet|first=Liam|last=Tung|date=2019-07-12}}</ref>。

2021年5月20日 (木) 22:36時点における版

JavaScriptエンジン (英語: JavaScript engine) は、JavaScriptのコードを実行するコンピュータプログラムである。初期のJavaScriptエンジンは単なるインタプリタであったが、近年の全てのエンジンは、性能の向上のためにJITコンパイルを利用している[1]

JavaScriptエンジンは通常、ウェブブラウザのベンダーによって開発されており、全ての主要なブラウザはそのエンジンを搭載している。ブラウザでは、JavaScriptエンジンはDOMを介してレンダリングエンジンと連携して実行される。

JavaScriptエンジンの使用はブラウザに限定されたものではなく、例えば、V8は一般的なNode.jsランタイムシステムのコアコンポーネントである。

ECMAScriptはJavaScriptの標準仕様なので、ECMAScriptエンジン (英語: ECMAScript engine) はJavaScriptエンジンの別名である。

歴史

最初のJavaScriptエンジンはNetscape Navigator向けにブレンダン・アイクによって1995年に作成された。これは彼によって新たに開発された言語であるJavaScriptのための初歩的なインタプリタであった[注釈 1]

最初のモダンなJavaScriptエンジンは、GoogleGoogle Chrome (Chromium) のために作成したV8である。V8は2008年にChromeの一部として登場し、それ以前のどのエンジンよりも遥かに優れた性能であった[2][3][4]。V8はJITコンパイルを採用したことが革新的であり、これによって実行時間を大幅に改善することができる。

V8との競争のために、他のブラウザベンダーはインタプリタをオーバーホールする必要があった[5]AppleSafari向けにNitroを開発した。このエンジンは以前のエンジンより30%優れた性能を示した[6]MozillaはNitroを部分的に活用して、SpiderMonkeyを改良した[7]OperaはインタプリタをCarakanに置き換えた。このエンジンは場合によっては従来より2倍高速であった[8]

2017年から、主要ブラウザがWebAssemblyに対応するようになり、性能が重要となる部分で事前にコンパイルされた実行ファイルを使用できるようになった。JavaScriptエンジンは通常のJavaScriptのコードと同じサンドボックスでWebAssemblyのコードを実行する。

主なエンジン

脚注

注釈

  1. ^ このエンジンはSpiderMonkey呼ばれており、改良された上でFirefoxでも引き続き使用されている。

出典

  1. ^ Looper, Jen (2015年9月21日). “A Guide to JavaScript Engines for Idiots”. Telerik Developer Network. 2019年1月16日時点のオリジナルよりアーカイブ。2016年3月17日閲覧。
  2. ^ Shankland, Stephen (2008年9月2日). “Speed test: Google Chrome beats Firefox, IE, Safari”. CNET Business Tech. CBS Interactive. 2019年11月9日閲覧。
  3. ^ Big browser comparison test: Internet Explorer vs. Firefox, Opera, Safari and Chrome”. PC Games Hardware. Computec Media AG. 2019年11月9日閲覧。
  4. ^ Lifehacker Speed Tests: Safari 4, Chrome 2”. Lifehacker. 2019年11月9日閲覧。
  5. ^ Mozilla asks, 'Are we fast yet?'”. Wired. 2019年1月18日閲覧。
  6. ^ Apple Releases Safari 5”. Cision PR Newswire (2010年6月7日). 2019年11月9日閲覧。
  7. ^ Shankland, Stephen (2010年3月2日). “Opera 10.5 brings new JavaScript engine”. CNET. CBS Interactive. 2019年11月9日閲覧。
  8. ^ Shankland, Stephen (2009年2月5日). “Need for speed spurs Opera JavaScript overhaul”. CNET. CBS Interactive. 2019年11月9日閲覧。
  9. ^ Stachowiak, Maciej (2008年11月9日). “Companies and Organizations that have contributed to WebKit”. WebKit Wiki. 2019年4月13日閲覧。
  10. ^ Belfiore, Joe (2018-12-06), Microsoft Edge: Making the web better through more open source collaboration, Microsoft, https://blogs.windows.com/windowsexperience/2018/12/06/microsoft-edge-making-the-web-better-through-more-open-source-collaboration 
  11. ^ Microsoft Edge and Chromium Open Source: Our Intent”. Microsoft Edge Team (2018年12月6日). 2018年12月8日閲覧。
  12. ^ Tung, Liam (2019-07-12), Facebook just released this new open source JavaScript engine, ZDNet, https://www.zdnet.com/article/facebook-just-released-a-new-open-source-javascript-engine/