Wed Feb 3 18:04:02 JST 2016 [word count] firefly cpu time 1 7.408101 2 3.800094 3 2.593649 4 1.982035 5 1.609130 6 1.356986 7 1.171626 8 1.038483 9 0.931845 10 0.851650 11 0.783369 12 0.741725 13 0.729744 14 0.721221 15 0.706474 16 0.694984 [mmap] 1 19.124272 4 17.701034 8 17.517347 16 16.844748 [bread] 1 15.219672 4 15.892460 8 13.709429 16 13.913612 ---------------------------------------- cache の消しかた %sudo purge ./cerium/ceriumGrep -regex '[A-Z][A-Za-z]*' -file ../../../Game/Cerium/example/bm_search/1GB.txt -cpu 16 -br [firefly] [キャッシュ有り : file 読み込み時間なし] firefly | CPU | time | 1 85.171171 2 55.709298 3 48.688031 4 42.053209 5 40.690125 6 37.075352 7 34.771558 8 36.138412 9 33.190304 10 35.892051 11 33.734864 12 31.231748 13 32.997263 14 31.953924 15 31.359396 16 31.367073 [キャッシュ無し : file 読み込み時間あり] [mmap] 1 96.669395 4 47.382920 8 40.574622 16 41.616542 [bread] 1 84.327310 4 44.930445 8 43.237358 16 42.504598 egrep -o [キャッシュ無し] egrep -o '[A-Z][a-zA-Z0-9_]*' ../../../Game/Cerium/example/bm_search/1GB.txt 110.78s user 24.05s system 99% cpu 2:15.22 total [キャッシュ有り] egrep -o '[A-Z][a-zA-Z0-9_]*' ../../../Game/Cerium/example/bm_search/1GB.txt 111.36s user 24.28s system 99% cpu 2:16.33 total ./cerium/ceriumGrep -regex '(a|b)*a(a|b)(a|b)' -file ../../../Game/Cerium/example/bm_search/1GB.txt -cpu 8 cpu time 1 58.409044 2 30.587006 3 19.761497 4 15.099642 5 12.150340 6 10.202328 7 8.794964 8 7.791925 9 6.884088 10 6.195592 11 5.702492 12 5.412080 13 5.330420 14 5.247614 15 5.165163 16 5.115427 [mmap] 1 70.830896 4 23.777594 8 16.743966 16 15.853613 [bread] 1 58.259406 4 19.307748 8 17.217379 16 15.243179 egrep -o '(a|b)*a(a|b)(a|b)' ../../../Game/Cerium/example/bm_search/1GB.txt 106.43s user 0.32s system 99% cpu 1:46.75 total ---------------------------------------------------------------- firefly (a|b) の数を増やしてみる ./cerium/ceriumGrep -subset -regex '(a|b)*a(a|b)[...]' -file file/ab1GB.txt -cpu 8 regex : (a|b)*a(a|b) cpu time 8 130.188505 regex : (a|b)*a(a|b)(a|b) cpu time 8 113.549269 regex : (a|b)*a(a|b)(a|b)(a|b) 8 114.059856 regex : (a|b)*a(a|b)(a|b)(a|b)(a|b) 8 115.274656 egrep -o '(a|b)*a(a|b)(a|b)' file/ab1GB.txt 223.31s user 40.86s system 99% cpu 4:24.17 total egrep -o '(a|b)*a(a|b)(a|b)(a|b)' file/ab1GB.txt 240.23s user 35.46s system 99% cpu 4:35.70 total egrep -o '(a|b)*a(a|b)(a|b)(a|b)(a|b)' file/ab1GB.txt 252.63s user 35.24s system 99% cpu 4:47.87 total Print があまりにも大きすぎて time の大半は Print じゃないか説 CentOS 7.2 os.cr.ie.u-ryukyu.ac.jp