For faster navigation, this Iframe is preloading the Wikiwand page for 動的コンパイル.

動的コンパイル

この記事は検証可能参考文献や出典が全く示されていないか、不十分です。 出典を追加して記事の信頼性向上にご協力ください。(このテンプレートの使い方)出典検索?"動的コンパイル" – ニュース · 書籍 · スカラー · CiNii · J-STAGE · NDL · dlib.jp · ジャパンサーチ · TWL (2018年10月)

動的コンパイル(どうてきコンパイル、: Dynamic compilation)とは、 プログラミング言語の実装で用いられる、プログラムの性能を実行時に向上させるための手法である。この技術はSelf プログラミング言語を起源としており、これを用いる最もよく知られた言語は Java である。動的コンパイルはランタイムにのみ知ることができる情報による最適化を可能にする。

通例動的コンパイルを用いる実行環境は、プログラムを開始後最初の数分間は低速で実行し、その後コンパイルと再コンパイルが完了すると、高速に実行する。このように開始直後パフォーマンスが低いことにより、動的コンパイルが好ましくない状況も存在する。また動的コンパイルの大半の実装では、初回のコンパイル時に実行可能な最適化も実行時に更なるコンパイルが行われるまで遅延させるため、不要にプログラムの動作を遅延させてしまうことがある。ジャストインタイムコンパイル (JITコンパイル) は、動的コンパイルの形態の一つである。

密接な関連のある技術として、増分コンパイルがある。増分コンパイラは、POP-2POP-11MaclispなどのLispの一部、またMLプログラミング言語の少なくとも一つのバージョン (Poplog) で用いられている。

増分コンパイルでは、対応するプログラミングのコンパイラが実行時環境の一部となっている必要がある。それゆえ、ソースコードは、端末や、ファイル、あるいは動作中のプログラムによって作成されるデータ構造からいつでも読み取り可能で、機械語コードや関数に変換ができ(同じ関数を置き換えることもできる)、即座にプログラムから利用可能になる。対話的な開発やテストの際のコンパイル速度への要求から、コンパイルされたコードは通常の「バッチ型コンパイラ」ほどの強い最適化は行われない。しかし、増分的にコンパイルされたプログラムは同じプログラムのインタプリタ版よりは高速に動作する。増分コンパイルはインタプリタ言語とコンパイル言語の双方の利点を備えている。移植性をもたらすため、一般的に増分コンパイラの動作は二段階に分かれることが望ましい。最初のコンパイルで何らかのプラットフォーム非依存の中間コードを生成し、次にこれをホストマシンの機械語コードにコンパイルする。上述の動的コンパイルとは異なり、増分コンパイルはプログラムが最初に動作した後に更なる最適化が行われることはない。

関連項目

[編集]

外部リンク

[編集]
{{bottomLinkPreText}} {{bottomLinkText}}
動的コンパイル
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?