LoginSignup
7
5

More than 5 years have passed since last update.

Windows Subsystem for Linux の fork は速いのか

Posted at

Windows10 で bash が動く!と話題になりましたね。
自宅の Windows にも Build 14352 のアップデートが掛かったので導入してみました。

概要については Windows Subsystem for Linux Overview の記事の画像がわかりやすいです。

で、fork は速いのか遅いのか

互換性やエコシステムの充実度も大事なのですが、個人的な使い勝手としては一番ここが大きいかなと。

bash で for i in {1..10000}; do date; done | uniq -c を実行。
出力の1行目と最終行は除外し、秒間に何回 date を呼び出せるかをざっくり計測してみました。

Platform \ Value mean median max min
Windows Subsystem for Linux 38.35 37 46 35
Cygwin 94.65 95 104 93
MSYS2 94.95 95 98 92

Windows Subsystem for Linux 遅いですね。
あくまでプレビューなので常用を考えること自体がおかしな話ではありますが、しばらくは Cygwin/MSYS2 のお世話になりそうです。

計測環境

  • CPU: Intel Core i5-3450 3.10 GHz
  • Windows 10 Home Insider Preview (Build 14352.rs1_release.160522-1930)

計測条件

  • Windows Defender の real-time protection をオフ
  • Windows Search サービスを停止

下記をデフォルトインストール後に計測。

  • Windows Subsystem for Linux (beta)
  • Cygwin (2.5.1, x86_64)
  • MSYS2 (20160205, x86_64)
7
5
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
5