Project

General

Profile

Actions

Bug #7356

closed

ruby-2.0.0-preview1 で adlint-2.6.10 が性能劣化

Added by yanoh (Yutaka Yanoh) over 11 years ago. Updated about 7 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.0.0dev (2012-11-01 trunk 37411) [i686-linux]
[ruby-dev:46520]

Description

== 現象

ruby-1.9.3-p327 と ruby-2.0.0-preview1 で adlint-2.6.10 の性能比較を行った結果、
ruby-2.0.0-preview1 の方が解析時間が 1.2 倍ほど長くかかりました。

== 再現手順

% gem install adlint
% tar xvjf adlint-benchmark-screen.tar.bz2 <- 添付ファイル
% cd adlint-benchmark-screen/adlint
% time make -j 2 2>/dev/null

== 性能測定結果

=== 測定環境

  • Core 2 Duo E4500 2.20GHz / 3.4GB
  • Fedora 14 / Linux 2.6.35.14-106.fc14.i686

=== 測定方法

  • 下記バージョンの ruby を用いて、adlint-2.6.10 で screen-4.0.3 を解析
    ruby 1.9.3p327 (2012-11-10 revision 37606) [i686-linux] built with gcc-4.5.1
    ruby 2.0.0dev (2012-11-01 trunk 37411) [i686-linux] built with gcc-4.5.1
    ruby 2.0.0dev (2012-11-01 trunk 37411) [i686-linux] built with gcc-4.7.2

  • すべて configure オプションは --prefix のみ

  • 解析は 2 コアを使い切れるよう make -j 2 を指定

  • できるだけ IO による遅延を抑えるため標準エラーは /dev/null へリダイレクト
    ただし解析結果ファイルの出力は抑止できていません

=== 測定結果

  • ruby 1.9.3p327 (2012-11-10 revision 37606) [i686-linux] built with gcc-4.5.1
    make -j 2 2> /dev/null 1335.85s user 7.10s system 184% cpu 12:07.79 total
    make -j 2 2> /dev/null 1336.54s user 7.17s system 184% cpu 12:07.80 total
    make -j 2 2> /dev/null 1340.71s user 7.23s system 184% cpu 12:10.69 total

  • ruby 2.0.0dev (2012-11-01 trunk 37411) [i686-linux] built with gcc-4.5.1
    make -j 2 2> /dev/null 1626.45s user 8.08s system 184% cpu 14:48.20 total
    make -j 2 2> /dev/null 1633.40s user 8.10s system 185% cpu 14:46.92 total
    make -j 2 2> /dev/null 1631.37s user 7.86s system 184% cpu 14:50.18 total

  • ruby 2.0.0dev (2012-11-01 trunk 37411) [i686-linux] built with gcc-4.7.2
    make -j 2 2> /dev/null 1531.83s user 7.85s system 184% cpu 13:53.04 total
    make -j 2 2> /dev/null 1533.46s user 7.97s system 184% cpu 13:54.54 total
    make -j 2 2> /dev/null 1532.89s user 8.03s system 184% cpu 13:53.33 total

== 備考

adlint_sma コマンドは、最初のソースコード読み込み時と最後の解析結果書き出し時に
IO が走る以外は、オンメモリで計算のみを実行しています。
データ構造は木構造が多く、再帰処理を多用し、小さな一時オブジェクトを多く new し
ています。


Files

adlint-benchmark-screen.tar.bz2 (898 KB) adlint-benchmark-screen.tar.bz2 screen-4.0.3 と AdLint 解析のための設定ファイル、必要なシステムヘッダをアーカイブ yanoh (Yutaka Yanoh), 11/15/2012 06:37 PM
r37410-adapted37582-partially.patch (1.38 KB) r37410-adapted37582-partially.patch wanabe (_ wanabe), 11/29/2012 12:33 AM
r37410-revert34948-partially.patch (381 Bytes) r37410-revert34948-partially.patch wanabe (_ wanabe), 11/29/2012 12:33 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0