JavaSE6リリース

随分と更新することを忘れてしまった間にJavaSE6がとうとうリリースされた。

JavaSE6と言えばコード名、Mustang。馬だ。
桜庭さんのじゃじゃ馬慣らしがJavaSE6の新機能について日本語では一番詳しい。

http://www.javainthebox.net/laboratory/JavaSE6/index.html

桜庭さんは日経BPにてJavaSE6に関しての連載も持たれていたらしい*1
http://itpro.nikkeibp.co.jp/article/COLUMN/20060929/249350/

この9月の連載の第一回を読むとやはりJavaSE6のリリースも難産だったようだ。

なぜ,こんなに弱気なのかというと,もともとJava SE 6は今年5月のJavaOneの前にリリースされるされる予定でした。それが,10月に延び,さらに12月に延びたという経緯があるのです。

思えば、J2SDK1.5のリリースは一昨年の9月、2年前だった。J2SDK1.5はメンテナンスリリースだけでも10個を数えてしまった。
ここで影が薄いのはIBMだ。
この日記では執拗にIBMからJ2SDK1.5がでないことをうらめしく綴り続けてきた。
IBMからJ2SDK1.5が出たのはなんと今年に入ってからである。*2
この思いは海外でも同じらしい。
JavaSE6がリリースを報じる記事に対するコメントの第一声は次のとおりだった。

Java 6 Released - Best "Out of the Box" Performance Ever

JDK 1.6 is definitely the most exciting Java release to date. However, at my work we won't be able to use 1.6 until we have a JDK for all platforms we officially support (and Java on AIX seems to always lag a little).

> officially support (and Java on AIX seems to always
> lag a little).

Just a little?

IBMも反省したという訳ではないのだろうが、JavaSE6に関してはEarly Release Programを既に行っている。
https://www14.software.ibm.com/iwm/web/cc/earlyprograms/ibm/java6/index.shtml

相変わらずWindows向けの提供はないようだ。
最近のIBMは製品に関してもβ版を提供したりするようになり、少しづつ改善しているようだ。

さて、SunとIBMの2つが提供されれば当然パフォーマンスを比較したいと思うだろう。
海外ではJavaSE6リリースに関してパフォーマンス向上に対する興味が強い。SunはJavaSE6のパフォーマンス向上に関して相当の自信を持っているようだ。*3
SunのJavaSE6におけるJVMの改訂については(なぜか日本IBMには翻訳の存在しないIBMDeveloperWorksの以下の記事の解説が詳しい。

http://www-128.ibm.com/developerworks/java/library/j-jtp10185/index.html

上のJavaLobbyの記事ではタイトルの元ネタになった記事を示して、JavaSE6のパフォーマンス向上を伝えている。

http://blogs.sun.com/dagastine/entry/java_6_leads_out_of

* On SPECjbb2005 the numbers are impressive. Java 6 out of the box is more than 40% ahead of the competition on Intel Core, and 30% ahead on AMD Opteron.
* On Scimark Java 6 continues to show solid performance leading the performance of the competition by more than 40%.
* On Volano, Java 6 improves performance by more than 20% over the most recent update of the JDK 5.

これだけの性能向上が複雑なチューニングオプションを用いなくても実現できるというのだから実に素晴らしいことだ。
SunはIBMのJ2SDK1.5SR3*4と比べて自社のJavaSE6の速さを強く訴えているわけだ。

で、だ。
面白いのはここでIBMのJavaSE6のEary ReleaseはSunのJavaSE6より速いと主張する御仁が現れた。
http://www.javalobby.org/java/forums/t86000.html
http://www.javalobby.org/java/forums/t86000.html#92077223

IBM 1.6 early release 10+% faster?
I'm not claiming I did a "proper" benchmark or anything, but a quick stupid casual running of Java2Demo with -server on both Sun's 1.6 and IBM's early 1.6 release seems to indicate an about 10% advantage for IBM - but it seems to pause a little more - maybe IBM's JVM allows the CPU to run more freely and postpones GC in the hopes that things settle...
The Sun JVM might be tunable in that way too - I haven't explored all the options yet.

Anyway, let's just not all forget IBM's efforts with all this excitement in the Sun... ;-)

It'd be interesting to keep our eyes open for a *updated* benchmark that includes *all* the main ones, Sun, IBM, and Apple at least.

ps. IBM's early release is for Linux *ONLY*.

真偽のほどはわからない上にJava2Demoでの測定*5なのだが、興味深い報告だろう。J2SDK1.5同士の比較ではIBMがSunより速かったという報告をみた覚えがないからだ。IBMはJava6の開発を相当頑張ったのかもしれない。

#全然関係ないがIBMのリリースの遅さに皆いらだっているのはかなり笑える。

Why should we pay attention to IBMs Java 6 at this point? IBMs JVM won't be available for a long, long time unless they dramatically change from their previous track record. It will be even longer until WebSphere supports Java 6.

Whatever else you want to say about IBMs JVMs they consistently are some of the last JVMs available and their products are consistently some of the slowest to support new Java versions.

というわけでSunのJava6リリースを紹介してみた。
いつものことだが、SI業界ではリリースされたからといってすぐに使えることはないだろう。しかしJDK1.5リリース時のWallmartのように既存のシステムのJVMをJava6に変更するだけで相当のパフォーマンスの向上が見込める。Java6は運用面を考慮した更新も多く、業務向けのJavaだ。開発者はすみやかにJava6の採用を考えるべきだろう。

*1:日経は何かと無料登録を強制するのであまり好きでないし、普段は読んでいない。もったいないけれども何かと記録されるのが嫌なのだ。

*2:製品で採用されたのはもっと後だ。

*3:JavaのパフォーマンスはJITの実装により大きく異なる。JVMではJITGCの実装は仕様上策定されていないからだ。ベンダー間の性能差は大きく、今だにJavaが遅いという御仁にはどこのJavaなのかをまず尋ねたほうが良い。マイナーなプラットフォームのJavaは実装ベンダーの技術力によりJITの性能が大きく左右される。SunやIBMIntel系のJVMにおいて既にCPUが何であるかまでを実行時に特定し、パイプラインやキャッシュの大きさまでを把握した上で動的なチューニングを行うという。

*4:SR3が出ていることも知らなかったがIBMのJ2SDK1.5のリリース履歴はJ2SDK自身の添付ドキュメント以外ではどこかで参照できるのだろうか?

*5:それにしてもデモってJ2SDK1.2以来ずっと更新されませんね?