Changeset 3503 for docs/Working


Ignore:
Timestamp:
Sep 15, 2013, 5:07:41 PM (6 years ago)
Author:
bhull
Message:

SSE2 Section Changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/Working/re/sse2.tex

    r3498 r3503  
    1111
    1212\paragraph{Expressions:}
    13 Each GREP implementation is tested with the five regular expressions in Table 1.  Xquote matches any of the representations of a quote in xml.  It is run on roads-2.gml, a 11,861,751 byte gml data file. The other four expressions are taken from Benchmark of Regex Libraries[?] and are all run on a concatenated version of the linux howto[?] which is 39,422,105 bytes in length.  @ simply matches the "@" character.  It demonstrates the overhead involved in matching the simplest regular expression.  Date, Email, and URIOrEmail provide examples of common uses for regular expression matching.
     13Each GREP implementation is tested with the five regular expressions in Table \ref{RegularExpressions}.  Xquote matches any of the representations of a quote in xml.  It is run on roads-2.gml, a 11,861,751 byte gml data file. The other four expressions are taken from Benchmark of Regex Libraries[?] and are all run on a concatenated version of the linux howto[?] which is 39,422,105 bytes in length.  @ simply matches the "@" character.  It demonstrates the overhead involved in matching the simplest regular expression.  Date, Email, and URIOrEmail provide examples of common uses for regular expression matching.
    1414
    1515
     
    4343
    4444\subsection{Comparison}
     45
     46Figure \ref{fig:SSECyclesPerByte} shows cycles per byte.  For the three most complicated expressions, the bitstreams implementation had the lowest cycle count.
     47
     48For the @ expression, Grep had very slightly better performance than the bitstreams implementation.  The bitstreams implementation has a fair amount of overhead for transposition that hurts relative performance for very simple expressions.
     49
     50For the Date expression, NRGrep is able to skip large portions of the input file since every time it encounters a character that can't appear in a date, it can skip past six characters.  For the more compicated expressions, it loses this advantage.
     51
     52The bitstreams implementation has fairly consistent performance.  As the regular expression complexity increases, the cycle count increases slowly.  The largest difference in cycles per byte for the bitstreams implementation is a ratio of 2 to 1.  The same cannot be said of Grep or NRGrep.  NRGrep uses more than 10 times the cycles per byte for Xquote than for Date.  The number of cycles per byte that Grep uses for URIOrEmail is almost 900 times as many as it uses for @.
     53
    4554\begin{figure}
    4655\begin{center}
     
    5665legend style={at={(0.5,-0.15)},
    5766anchor=north,legend columns=-1},
    58 ymax=8,
     67ymax=12,
    5968ybar,
    6069bar width=7pt,
     
    7281\end{tikzpicture}
    7382\end{center}
    74 \caption{Cycles per Byte}
     83\caption{Cycles per Byte}\label{fig:SSECyclesPerByte}
    7584\end{figure}
     85
     86Figure \ref{fig:SSEInstructionsPerByte} shows instructions per byte.  The relative values mirror cycles per byte.  The bitstreams implementation continues to show consistent performance.  This is especially noticeable in Figure \ref{fig:SSEInstructionsPerCycle}, which shows instructions per cycle.  The bitstreams implementation has almost no variation in the instructions per cycle.  Both Grep and NRGrep have considerably more variation based on the input regular expression.
    7687 
    7788\begin{figure}
     
    8899legend style={at={(0.5,-0.15)},
    89100anchor=north,legend columns=-1},
    90 ymax=16,
     101ymax=25,
    91102ybar,
    92103bar width=7pt,
     
    103114\end{tikzpicture}
    104115\end{center}
    105 \caption{Instructions per Byte}
     116\caption{Instructions per Byte}\label{fig:SSEInstructionsPerByte}
    106117\end{figure}
     118
    107119
    108120\begin{figure}
     
    133145\end{tikzpicture}
    134146\end{center}
    135 \caption{Instructions per Cycle}
     147\caption{Instructions per Cycle}\label{fig:SSEInstructionsPerCycle}
    136148\end{figure}
     149
     150Figure \ref{fig:SSEBranchMisses} shows the branch misses per kilobyte.  The bitstreams implementation remains consistent here.  NRGrep and Grep have branch miss rates that vary significantly with different regular expressions. 
     151
     152Overall, our performance is considerably better than both NRGrep and Grep for the more complicated expressions that were tested.  Also, our performance scales smoothly with regular expression complexity so it can be expected to remain better for complicated expressions in general.
    137153
    138154\begin{figure}
     
    141157\begin{axis}[
    142158xtick=data,
    143 ylabel=Branch Misses per Byte,
     159ylabel=Branch Misses per Kilobyte,
    144160xticklabels={@,Date,Email,URIorEmail,xquote},
    145161tick label style={font=\tiny},
     
    149165legend style={at={(0.5,-0.15)},
    150166anchor=north,legend columns=-1},
    151 ymax=0.03,
    152167ybar,
     168ymax=40,
    153169bar width=7pt,
    154170]
     
    164180\end{tikzpicture}
    165181\end{center}
    166 \caption{Branch Misses per Byte}
     182\caption{Branch Misses per Kilobyte}\label{fig:SSEBranchMisses}
    167183\end{figure}
    168184
Note: See TracChangeset for help on using the changeset viewer.