Python vs Ruby vs Haskell(文字列検索deベンチマーク)

ファイル名と検索したい文字列を与えると、そのファイルの中で検索文字列がヒットした位置のリスト(又は配列)を表示するプログラムを、HaskellPythonRubyで作り、ベンチマークを取ってみました。
こちらMicrosoft OneDrive - Access files anywhere. Create docs with free Office Online.に置いてあるpi.datの中に、7777777(7が7つ)がどの位置に有るのかを検索して、その速度を比較します。

まずは、各言語のコードを見ていきましょう。

Haskell

>|haskell|
import System.Environment
import qualified Data.ByteString.Char8 as B

search _ _ ns | B.null ns = []
search (y,x) s ns | B.take (B.length s) ns == s = (y,x):search (y,x + 1) s (B.tail ns)
search (y,_) s ns | B.head ns == '\n' = search (y + 1,1) s (B.tail ns)
search (y,x) s ns = search (y,x + 1) s (B.tail ns)

main = getArgs >>= \args ->
B.readFile (args!!0) >>=
return.search (1,1) (B.pack (args!!1)) >>= \pos ->
putStrLn (args!!0) >>
print pos
|