H2Oの内部では,数値,文字列のフォーマッタとしてsprintfが用いられています. 我々は,最近までsprintf専用ソースコード変換器, qrintfのチューニングを行っていました. 本稿ではqrintfの概要と今回適応した工夫,そして今後の課題についてまとめておきます. 1. qrintfとは? qrintfとはCコンパイラの1つであるgccのプリプロセッサのラッパーであり,snprintfを高速化するソースコード変換器です. 本稿執筆時点でのqrintfの変換対象はsprintfとsnprintfです.以下本文中では特にことわりのない限りsprintfと記述した場合sprintf, snprintfの両方を指します. qrintfはソースコードに出現するsprintfで利用するフォーマット文字列を解析し,型ごとに用意された関数呼出にコードを書き換えsprintfの高速化を行います.
mrubyの最新版に実行速度改善の修正が入った。arena_aiを必要なところのみに入れる、while最適化、無駄なOP_LOADNILの削除、だ。 これによりtimesの命令列はこのようになった。 irep 150 nregs=6 nlocals=4 pools=0 syms=3 000 OP_ENTER 0:0:0:0:0:0:1 001 OP_LOADI R2 0 002 OP_JMP 012 003 OP_MOVE R4 R1 004 OP_MOVE R5 R2 005 OP_LOADNIL R6 006 OP_SEND R4 :call 1 007 OP_MOVE R4 R2 008 OP_LOADI R5 1 009 OP_LOADNIL R6 010 OP_ADD R4 :+ 1 011 OP_MOVE R2 R4 012 OP_MOVE R4 R2 013 OP_LOADS
Status The branch has been merged to trunk and is now closed. Final merge announcement: http://gcc.gnu.org/ml/gcc/2009-10/msg00060.html Background Link Time Optimization (LTO) gives GCC the capability of dumping its internal representation (GIMPLE) to disk, so that all the different compilation units that make up a single executable can be optimized as a single module. This expands the scope of in
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く