Table column align on decimal

With siunitx, the unit ns is added via the column specification <, its space is reserved in the S column with the table-space-text-pst option. (It may be preferable to give the unit in the head and not in every row as it probably also applies to the parenthesized values, doesn’t it?)

In the last column the ( and ) are removed as input-open and input-close-uncertainty characters so that they can be used in the column freely.

Code

\documentclass[varwidth,convert=false]{standalone}
\usepackage{booktabs}
\usepackage{siunitx}
\begin{document}
\begin{tabular}{
  l
  S[table-format=9.1, table-space-text-post={\,\si{\nano\second}}]
    <{\,\si{\nano\second}}
  S[table-format=8.0, table-space-text-pre=(, table-space-text-post=),
                      input-close-uncertainty={[}, input-open-uncertainty={]}]
}
    \toprule
    Description                         & \multicolumn{1}{c}{Some time} & {\footnotesize Other value} \\ \midrule
    L1 cache reference                  & .5                            &  \\
    Branch mispredict                   & 5                             &  \\
    L2 cache reference                  & 7                             &  \\
    Mutex lock/unlock                   & 100                           & (25)                        \\
    Main memory reference               & 100                           &  \\
    Compress 1K bytes with Zippy        & 10 000                        & (3 000)                     \\
    Send 2K bytes over 1 Gbps network   & 20 000                        &  \\
    Read 1 MB sequentially from memory  & 250 000                       &  \\
    Round trip within same datacenter   & 500 000                       &  \\
    Disk seek                           & 10 000 000                    &  \\
    Read 1 MB sequentially from network & 10 000 000                    &  \\
    Read 1 MB sequentially from disk    & 30 000 000                    & (20 000 000)                \\
    Send packet CA to Netherlands to CA & 150 000 000                   &  \\ \bottomrule
\end{tabular}
\end{document}

Output

enter image description here


One possibility using the dcolumn package:

\documentclass{article}
\usepackage{dcolumn}
\usepackage{amsmath}


\begin{document}

\begin{tabular}{ | l | D{;}{\text{\,ns\,}}{-1}  |}
\hline
L1 cache reference                  &            0.5 ;       \\
Branch mispredict                   &            5 ;         \\
L2 cache reference                  &            7 ;         \\
Mutex lock/unlock                   &          100 ; (25)    \\
Main memory reference               &          100 ;         \\
Compress 1K bytes with Zippy        &       10,000 ; (3,000) \\
Send 2K bytes over 1 Gbps network   &       20,000 ;         \\
Read 1 MB sequentially from memory  &      250,000 ;         \\
Round trip within same datacenter   &      500,000 ;         \\
Disk seek                           &   10,000,000 ;         \\
Read 1 MB sequentially from network &   10,000,000 ;         \\
Read 1 MB sequentially from disk    &   30,000,000 ; (20,000,000) \\
Send packet CA to Netherlands to CA & 150,000,000 ; \\
\hline
\end{tabular}

\end{document}

enter image description here

Perhaps the booktabs package might be of interest for you; you're tables will look much better, the use of vertical rules is discouraged.

The same table, using booktabs:

\documentclass{article}
\usepackage{booktabs}
\usepackage{dcolumn}
\usepackage{amsmath}


\begin{document}

\begin{tabular}{  l  D{;}{\text{\,ns\,}}{-1} }
\toprule
L1 cache reference                  &            0.5 ;       \\
Branch mispredict                   &            5 ;         \\
L2 cache reference                  &            7 ;         \\
Mutex lock/unlock                   &          100 ; (25)    \\
Main memory reference               &          100 ;         \\
Compress 1K bytes with Zippy        &       10,000 ; (3,000) \\
Send 2K bytes over 1 Gbps network   &       20,000 ;         \\
Read 1 MB sequentially from memory  &      250,000 ;         \\
Round trip within same datacenter   &      500,000 ;         \\
Disk seek                           &   10,000,000 ;         \\
Read 1 MB sequentially from network &   10,000,000 ;         \\
Read 1 MB sequentially from disk    &   30,000,000 ; (20,000,000) \\
Send packet CA to Netherlands to CA & 150,000,000 ; \\
\bottomrule
\end{tabular}

\end{document}

enter image description here