Mercurial > hg > Papers > 2019 > anatofuz-thesis
changeset 70:d556613115e0
update
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 18 Feb 2019 16:32:35 +0900 |
parents | c22400d1d0a4 |
children | 8badccde37ac |
files | paper/chapter5.tex paper/codes/incre.nqp paper/codes/test.nqp paper/main.pdf |
diffstat | 4 files changed, 33 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/paper/chapter5.tex Mon Feb 18 16:11:50 2019 +0900 +++ b/paper/chapter5.tex Mon Feb 18 16:32:35 2019 +0900 @@ -33,6 +33,12 @@ \lstinputlisting[frame=lrbt, label=cbc_breakpoint, caption=CbCMoarVMのbreak pointトレース時の表示]{./codes/src/trace_cbc.txt} \section{パフォーマンス} +オリジナルのバイトコードインタプリタ、 CbCMoarVMバイトコードインタプリタの両方で速度を測定した。 +検証には、Perl6よりも軽量であることからNQPを選択した。 + +使用するNQPプログラムは、ソースコード\ref{fib_nqp}に示すフィボナッチ数列を求める例題と、 ソースコード\ref{incre_nqp}に示すインクリメントを単純ループで続ける例題を選択した。 + +\lstinputlisting[frame=lrbt, label=incre_nqp, caption=インクリメントを繰り返すNQPのサンプルコード]{./codes/incre.nqp} CbCMoarVMでは現在モジュール化は行っているが、 具体的な速度上昇に対する実装は行っていない。
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paper/codes/incre.nqp Mon Feb 18 16:32:35 2019 +0900 @@ -0,0 +1,8 @@ +#! nqp + +my $count := 100_000_000; + +my $i := 0; + +while ++$i <= $count { +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paper/codes/test.nqp Mon Feb 18 16:32:35 2019 +0900 @@ -0,0 +1,19 @@ +#! nqp + +# check control structure 'if' + +say('1..6'); + +if 1 { say("ok 1 # on one line"); } + +say("ok 2 # statements following if are okay"); + +if 1 { + say("ok 3 # multi-line if"); +} + +if 0 { + print("not "); +} + +