# HG changeset patch # User Masataka Kohagura # Date 1455211414 -32400 # Node ID 5edd3ec9b31c4f809818cf122d6361553d436f35 # Parent ddb86a4c18cc7f9d2a596f31c45525c7e0d6e045 add diff -r ddb86a4c18cc -r 5edd3ec9b31c c5.tex --- a/c5.tex Fri Feb 12 00:13:39 2016 +0900 +++ b/c5.tex Fri Feb 12 02:23:34 2016 +0900 @@ -2,6 +2,8 @@ \section{I/O の測定} \section{Word Count} + + \section{正規表現} \begin{itemize} diff -r ddb86a4c18cc -r 5edd3ec9b31c memo/IOwordcount.pdf Binary file memo/IOwordcount.pdf has changed diff -r ddb86a4c18cc -r 5edd3ec9b31c memo/IOwordcount.plt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/memo/IOwordcount.plt Fri Feb 12 02:23:34 2016 +0900 @@ -0,0 +1,141 @@ +#!/usr/local/bin/gnuplot -persist +# +# +# G N U P L O T +# Version 4.2 patchlevel 6 +# last modified Sep 2009 +# System: Darwin 13.0.0 +# +# Copyright (C) 1986 - 1993, 1998, 2004, 2007 - 2009 +# Thomas Williams, Colin Kelley and many others +# +# Type `help` to access the on-line reference manual. +# The gnuplot FAQ is available from http://www.gnuplot.info/faq/ +# +# Send bug reports and suggestions to +# +# set terminal aqua 0 title "Figure 0" size 846,594 font "Times-Roman,14" noenhanced solid +# set output +unset clip points +set clip one +unset clip two +set bar 1.000000 +set border 31 front linetype -1 linewidth 1.000 +set xdata +set ydata +set zdata +set x2data +set y2data +set boxwidth +set style fill empty border +set style rectangle back fc lt -3 fillstyle solid 1.00 border -1 +set dummy x,y +set angles radians +set grid nopolar +set grid xtics nomxtics ytics nomytics noztics nomztics \ + nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics +set grid layerdefault linetype 0 linewidth 1.000, linetype 0 linewidth 1.000 +set key title "" +set key inside right top vertical Right noreverse enhanced autotitles nobox +set key noinvert samplen 4 spacing 1 width 0 height 0 +unset label +unset arrow +set style increment default +unset style line +unset style arrow +set style histogram clustered gap 2 title offset character 0, 0, 0 +unset logscale +set offsets 0, 0, 0, 0 +set pointsize 1 +set encoding default +unset polar +unset parametric +unset decimalsign +set view 60, 30, 1, 1 +set samples 100, 100 +set isosamples 10, 10 +set surface +unset contour +set clabel '%8.3g' +set mapping cartesian +set datafile separator whitespace +unset hidden3d +set cntrparam order 4 +set cntrparam linear +set cntrparam levels auto 5 +set cntrparam points 5 +set size ratio 0 1,1 +set origin 0,0 +set style data points +set style function lines +set xzeroaxis linetype -2 linewidth 1.000 +set yzeroaxis linetype -2 linewidth 1.000 +set zzeroaxis linetype -2 linewidth 1.000 +set x2zeroaxis linetype -2 linewidth 1.000 +set y2zeroaxis linetype -2 linewidth 1.000 +set ticslevel 0.5 +set mxtics default +set mytics default +set mztics default +set mx2tics default +set my2tics default +set mcbtics default +set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set xtics 4 norangelimit +set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set ytics 2 norangelimit +set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 +set ztics autofreq norangelimit +set nox2tics +set noy2tics +set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set cbtics autofreq norangelimit +set title "" +set title offset character 0, 0, 0 font "" norotate +set timestamp bottom +set timestamp "" +set timestamp offset character 0, 0, 0 font "" norotate +set rrange [ * : * ] noreverse nowriteback # (currently [0.00000:10.0000] ) +set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) +set urange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) +set vrange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) +set xlabel "" +set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set x2label "" +set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate +set xrange [ 1.00000 : 12.00000 ] noreverse nowriteback +set x2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set ylabel "" +set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set y2label "" +set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set yrange [ 0.00000 : 12.000 ] noreverse nowriteback +set y2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set zlabel "" +set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set cblabel "" +set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set cbrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set zero 1e-08 +set lmargin -1 +set bmargin -1 +set rmargin -1 +set tmargin -1 +set locale "C" +set pm3d explicit at s +set pm3d scansautomatic +set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean +set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB +set palette rgbformulae 7, 5, 15 +set colorbox default +set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault +set loadpath +set fontpath +set xlabel "CPUNUM" +set ylabel "time(s)" +set fit noerrorvariables +GNUTERM = "aqua" +plot "IOwordcount.txt" using 1:2 title "mmap" with lines, "IOwordcount.txt" using 1:3 title "blocked read" with lines,"IOwordcount.txt" using 1:4 title "wc(Mac)" with lines +# plot "./io_speany.txt" using 1:2 title "MMAP & SPE_ANY" with lines,"./io_speany.txt" using 1:3 title "divide read & SPE_ANY" with lines,"./io_speany.txt" using 1:4 title "MMAP & IO_0" with lines,"./io_speany.txt" using 1:5 title "divide read & IO_0" with lines +# EOF diff -r ddb86a4c18cc -r 5edd3ec9b31c memo/IOwordcount.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/memo/IOwordcount.txt Fri Feb 12 02:23:34 2016 +0900 @@ -0,0 +1,4 @@ + 1 9.957094 9.326340 10.590 + 4 8.165822 8.520677 10.590 + 8 8.024731 8.478104 10.590 +12 7.891325 8.361119 10.590 diff -r ddb86a4c18cc -r 5edd3ec9b31c memo/result.txt --- a/memo/result.txt Fri Feb 12 00:13:39 2016 +0900 +++ b/memo/result.txt Fri Feb 12 02:23:34 2016 +0900 @@ -1,5 +1,30 @@ Wed Feb 10 11:06:12 JST 2016 +[word count] + [firefly] + cache あり +wc 500MB.txt > /dev/null 3.94s user 0.14s system 99% cpu 4.079 total + cpu time + 1 3.702293 + 4 1.003647 + 8 0.529814 + 12 0.398372 + + + cache なし +wc 500MB.txt >/dev/null 3.95s user 0.20s system 39% cpu 10.590 total + [mmap] + 1 9.957094 + 4 8.165822 + 8 8.024731 + 12 7.891325 + + [bread] + 1 9.326340 + 4 8.520677 + 8 8.478104 + 12 8.361119 + cpu 6 ./cerium/ceriumGrep -regex '(a|b)*a(a|b)(a|b)' -br -file file/ab500MB.txt -cp 32.90s user 1.28s system 99% cpu 34.514 total @@ -27,7 +52,6 @@ [キャッシュ有] cpu time 1 29.053 - 2 24.032 4 21.091 8 16.595 12 16.021 @@ -42,7 +66,6 @@ [キャッシュ無 bread] cpu time 1 40.494 - 2 36.912 4 33.718 8 34.257 12 32.457 @@ -56,45 +79,21 @@ [キャッシュ有] cpu time 1 25.721 - 2 15.518 - 3 12.260 4 11.165 - 5 9.659 - 6 9.183 - 7 8.551 8 8.180 - 9 7.873 -10 7.680 -11 7.509 12 7.380 egrep 56.506 [キャッシュ無 : bread] 1 30.682 - 2 19.841 - 3 17.822 4 16.497 - 5 16.491 - 6 14.145 - 7 16.375 8 15.907 - 9 15.755 -10 15.047 -11 15.777 12 15.004 [キャッシュ無 : mmap] 1 35.783 - 2 22.758 - 3 19.466 4 17.189 - 5 15.653 - 6 16.141 - 7 15.388 8 15.901 - 9 15.174 -10 14.709 -11 14.804 12 15.798 -- DFA を生成後、配列にアクセスして状態遷移-- @@ -139,6 +138,7 @@ キャッシュがあってもなってもかわらない。 (ファイルを毎回読み込みながら grep してる?) + ------------------------------------------- Mon Feb 8 17:24:16 JST 2016 @@ -147,6 +147,7 @@ ab500MB.txt '(a|b)*a(a|b)(a|b)' +↓ 測定条件かえ time cgrep -G '[A-Z][a-zA-Z0-9_]*' ../../Game/Cerium/example/bm_search/1GB.txt --no-line-umber --no-filename >/dev/null diff -r ddb86a4c18cc -r 5edd3ec9b31c memo/wordcount.plt --- a/memo/wordcount.plt Fri Feb 12 00:13:39 2016 +0900 +++ b/memo/wordcount.plt Fri Feb 12 02:23:34 2016 +0900 @@ -109,7 +109,7 @@ set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 set y2label "" set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 -set yrange [ 0.00000 : 8.000 ] noreverse nowriteback +set yrange [ 0.00000 : 5.000 ] noreverse nowriteback set y2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) set zlabel "" set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate @@ -136,6 +136,6 @@ set ylabel "time(s)" set fit noerrorvariables GNUTERM = "aqua" -plot "wordcount.txt" using 1:2 title "MMAP" with lines +plot "wordcount.txt" using 1:2 title "parallel wordcount" with lines, "wordcount.txt" using 1:3 title "wc(Mac)" with lines # plot "./io_speany.txt" using 1:2 title "MMAP & SPE_ANY" with lines,"./io_speany.txt" using 1:3 title "divide read & SPE_ANY" with lines,"./io_speany.txt" using 1:4 title "MMAP & IO_0" with lines,"./io_speany.txt" using 1:5 title "divide read & IO_0" with lines # EOF diff -r ddb86a4c18cc -r 5edd3ec9b31c memo/wordcount.txt --- a/memo/wordcount.txt Fri Feb 12 00:13:39 2016 +0900 +++ b/memo/wordcount.txt Fri Feb 12 02:23:34 2016 +0900 @@ -1,13 +1,5 @@ -# 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 +# cpu time + 1 3.702293 4.079 + 4 1.003647 4.079 + 8 0.529814 4.079 +12 0.398372 4.079 diff -r ddb86a4c18cc -r 5edd3ec9b31c memo/wordcountresult.pdf Binary file memo/wordcountresult.pdf has changed