Index: doc/theses/mike_brooks_MMath/plots/ListCommon.py
===================================================================
--- doc/theses/mike_brooks_MMath/plots/ListCommon.py	(revision 75ba2fa6bfec80d9e7a6929eee5e8738f14cc496)
+++ doc/theses/mike_brooks_MMath/plots/ListCommon.py	(revision e35ecd0d30acc83cf5a77153bc63d9d21802b580)
@@ -372,4 +372,10 @@
 
 
+def trimPer( df, criteria ):
+    for field, values in criteria.items():
+        areMatches = df[ field ].isin(values)
+        df = df[ areMatches ]
+    return df
+
 # The range from 0.9759 to 1.0247 (which is 1.05 x wide) has 1.0 in its centre.
 # This is the bucket with key 0.
@@ -417,4 +423,6 @@
     tgtAccessor = 'all',
     tgtInterleave = 0.0,
+    earlyFilter = {}, # exclude from benchmarking
+    lateFilter = {}, # exclude from output
     drillOn = ['fx'],
     marginalizeOn = None ):  # None means match drill-on
@@ -434,19 +442,14 @@
                   szInc = ['SM', 'ML'],
                   sExcl = [1] )
-
-
-#    annotateBaselines(timings)
-
+    
+    timings = trimPer( timings, earlyFilter )
 
     options = timings.groupby(explanations)
-
     aggregated = options.agg(
         mean_op_dur_ns = ('mean_op_dur_ns', gMeanNoOutlr)
     ).reset_index()
-
-
     annotateBaseline(aggregated, marginalizeOn)
-#    annotateCommonBaselines(aggregated)
-
+
+    aggregated = trimPer( aggregated, lateFilter )
 
     # if examining "why CFA slow" need both
@@ -467,5 +470,4 @@
 
     drillgrp = aggregated.groupby(drillOn)
-
 
     # print(f'measure is {measure}')
Index: doc/theses/mike_brooks_MMath/plots/list-2ord.d
===================================================================
--- doc/theses/mike_brooks_MMath/plots/list-2ord.d	(revision e35ecd0d30acc83cf5a77153bc63d9d21802b580)
+++ doc/theses/mike_brooks_MMath/plots/list-2ord.d	(revision e35ecd0d30acc83cf5a77153bc63d9d21802b580)
@@ -0,0 +1,2 @@
+plots/list-2ord.gp.INPUTS: build/plot-list-2ord.dat | build
+plots/list-2ord.py.INPUTS: benchmarks/list/results-swift-general.csv
Index: doc/theses/mike_brooks_MMath/plots/list-2ord.gp
===================================================================
--- doc/theses/mike_brooks_MMath/plots/list-2ord.gp	(revision e35ecd0d30acc83cf5a77153bc63d9d21802b580)
+++ doc/theses/mike_brooks_MMath/plots/list-2ord.gp	(revision e35ecd0d30acc83cf5a77153bc63d9d21802b580)
@@ -0,0 +1,143 @@
+set terminal pdfcairo color enhanced size 6.5in,3.5in font "Times,17"
+
+set size 1.0, 1.0    # scale of plot area inside terminal
+set origin 0.0, 0.0  # bottom-left corner
+
+INDIR="build"
+OUTDIR="build"
+
+set macros
+set output OUTDIR."/plot-list-2ord.pdf"
+
+set lmargin 10
+set bmargin 5
+set tmargin 2
+
+set grid
+set nokey
+
+set logscale y (2**0.2)
+set yrange [0.57:1.65];
+set format y "%.2f {/Symbol \264}"
+set ytics (0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6)
+set ylabel "Speedup,  bot. opt.  {/Symbol \256}  top opt." offset -0.5,0
+
+# Draw fake x axis at y=1.0; use vertical-only bounding 'H'
+unset border
+set arrow from graph 0, first 1 to graph 1, first 1 nohead lt -1 lw 2
+set arrow 100 from graph 0, graph 0 to graph 0, graph 1 nohead lw 1 front
+set arrow 101 from graph 1, graph 0 to graph 1, graph 1 nohead lw 1 front
+
+set xrange [-0.7:27.5];
+set xlabel "Criterion;  top / bot. Options;  Prevalence" offset 0,-1.5
+set format x ""
+set xtics ( \
+   0, 1, 2, 3, \
+   5, 6, 7, 8, \
+   10, 11, 12, \
+   14, 15, 16, \
+   18, 19, 20, 21, \
+   23, 24, 25, 26 \
+) scale 0
+
+set label "small"                           at first  1.5, graph  1.05 center
+set label "(AMD)"                           at first  1.5, graph  0.06 center font "Times-Bold,18"
+set label "medium"                          at first  1.5, graph -0.05 center
+set label "small"                           at first  6.5, graph  1.05 center
+set label "(Intel)"                         at first  6.5, graph  0.06 center font "Times-Bold,18"
+set label "medium"                          at first  6.5, graph -0.05 center
+set label "Size Zone"                       at first  4  , graph -0.14 center
+
+set label "stack"                           at first 11  , graph  1.05 center
+set label "queue"                           at first 11  , graph -0.05 center
+set label "Movement"                        at first 11  , graph -0.14 center
+
+set label "ins. first"                      at first 15  , graph  1.05 center
+set label "ins. last"                       at first 15  , graph -0.05 center
+set label "Polarity"                        at first 15  , graph -0.14 center
+
+set label "all head"                        at first 19.5, graph  1.05 center
+set label "ins. elem."                      at first 19.5, graph -0.05 center
+set label "all head"                        at first 24.5, graph  1.05 center
+set label "rem. elem"                       at first 24.5, graph -0.05 center
+set label "Accessor"                        at first 22  , graph -0.14 center
+
+
+# group size zone
+set arrow 10+.4 from  0-.4, graph -0.10 to  8+.4, graph -0.10 nohead lw 1
+set arrow 11+.4 from  0-.4, graph -0.10 to  0-.4, graph -0.08 nohead lw 1
+set arrow 12+.4 from  8+.4, graph -0.10 to  8+.4, graph -0.08 nohead lw 1
+
+# group movement
+set arrow 13+.4 from 10-.4, graph -0.10 to 12+.4, graph -0.10 nohead lw 1
+set arrow 14+.4 from 10-.4, graph -0.10 to 10-.4, graph -0.08 nohead lw 1
+set arrow 15+.4 from 12+.4, graph -0.10 to 12+.4, graph -0.08 nohead lw 1
+
+# group polarity
+set arrow 16+.4 from 14-.4, graph -0.10 to 16+.4, graph -0.10 nohead lw 1
+set arrow 17+.4 from 14-.4, graph -0.10 to 14-.4, graph -0.08 nohead lw 1
+set arrow 18+.4 from 16+.4, graph -0.10 to 16+.4, graph -0.08 nohead lw 1
+
+# group accessor
+set arrow 19+.4 from 18-.4, graph -0.10 to 26+.4, graph -0.10 nohead lw 1
+set arrow 20+.4 from 18-.4, graph -0.10 to 18-.4, graph -0.08 nohead lw 1
+set arrow 21+.4 from 26+.4, graph -0.10 to 26+.4, graph -0.08 nohead lw 1
+
+set errorbars 2.0
+set pointintervalbox 0
+
+barHtScale_phys = 0.05
+barHtScale_op = 0.1
+barHtScale_fx = 0.05
+
+
+plot INDIR."/plot-list-2ord.dat" \
+       i ( 0 + 0) using (0):(0):( 0 + 0):( 0 + 0 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "blue"        fs transparent solid 0.15 noborder, \
+    '' i ( 0 + 3) using (0):(0):( 0 + 1):( 0 + 1 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "dark-orange" fs transparent solid 0.15 noborder, \
+    '' i ( 0 + 2) using (0):(0):( 0 + 2):( 0 + 2 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "magenta"     fs transparent solid 0.15 noborder, \
+    '' i ( 0 + 1) using (0):(0):( 0 + 3):( 0 + 3 + 3.5 * barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "purple"      fs transparent solid 0.35 noborder, \
+    '' i ( 0 + 0) using                  ( 0 + 0 +       barHtScale_fx * $3):2 notitle with steps lc rgb "blue"         lw 0.3, \
+    '' i ( 0 + 3) using                  ( 0 + 1 +       barHtScale_fx * $3):2 notitle with steps lc rgb "dark-orange"  lw 0.3, \
+    '' i ( 0 + 2) using                  ( 0 + 2 +       barHtScale_fx * $3):2 notitle with steps lc rgb "magenta"      lw 0.3, \
+    '' i ( 0 + 1) using                  ( 0 + 3 + 3.5 * barHtScale_fx * $3):2 notitle with steps lc rgb "purple"       lw 0.3, \
+\
+    '' i ( 4 + 0) using (0):(0):( 5 + 0):( 5 + 0 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "blue"        fs transparent solid 0.15 noborder, \
+    '' i ( 4 + 3) using (0):(0):( 5 + 1):( 5 + 1 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "dark-orange" fs transparent solid 0.15 noborder, \
+    '' i ( 4 + 2) using (0):(0):( 5 + 2):( 5 + 2 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "magenta"     fs transparent solid 0.15 noborder, \
+    '' i ( 4 + 1) using (0):(0):( 5 + 3):( 5 + 3 + 3.5 * barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "purple"      fs transparent solid 0.35 noborder, \
+    '' i ( 4 + 0) using                  ( 5 + 0 +       barHtScale_fx * $3):2 notitle with steps lc rgb "blue"         lw 0.3, \
+    '' i ( 4 + 3) using                  ( 5 + 1 +       barHtScale_fx * $3):2 notitle with steps lc rgb "dark-orange"  lw 0.3, \
+    '' i ( 4 + 2) using                  ( 5 + 2 +       barHtScale_fx * $3):2 notitle with steps lc rgb "magenta"      lw 0.3, \
+    '' i ( 4 + 1) using                  ( 5 + 3 + 3.5 * barHtScale_fx * $3):2 notitle with steps lc rgb "purple"       lw 0.3, \
+\
+    '' i ( 8 + 0) using (0):(0):(10 + 0):(10 + 0 + barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "blue"        fs transparent solid 0.15 noborder, \
+    '' i ( 8 + 2) using (0):(0):(10 + 1):(10 + 1 + barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "dark-orange" fs transparent solid 0.15 noborder, \
+    '' i ( 8 + 1) using (0):(0):(10 + 2):(10 + 2 + barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "magenta"     fs transparent solid 0.15 noborder, \
+    '' i ( 8 + 0) using                  (10 + 0 + barHtScale_fx * $3):2 notitle with steps lc rgb "blue"         lw 0.3, \
+    '' i ( 8 + 2) using                  (10 + 1 + barHtScale_fx * $3):2 notitle with steps lc rgb "dark-orange"  lw 0.3, \
+    '' i ( 8 + 1) using                  (10 + 2 + barHtScale_fx * $3):2 notitle with steps lc rgb "magenta"      lw 0.3, \
+\
+    '' i (11 + 0) using (0):(0):(14 + 0):(14 + 0 + barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "blue"        fs transparent solid 0.15 noborder, \
+    '' i (11 + 2) using (0):(0):(14 + 1):(14 + 1 + barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "dark-orange" fs transparent solid 0.15 noborder, \
+    '' i (11 + 1) using (0):(0):(14 + 2):(14 + 2 + barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "magenta"     fs transparent solid 0.15 noborder, \
+    '' i (11 + 0) using                  (14 + 0 + barHtScale_fx * $3):2 notitle with steps lc rgb "blue"         lw 0.3, \
+    '' i (11 + 2) using                  (14 + 1 + barHtScale_fx * $3):2 notitle with steps lc rgb "dark-orange"  lw 0.3, \
+    '' i (11 + 1) using                  (14 + 2 + barHtScale_fx * $3):2 notitle with steps lc rgb "magenta"      lw 0.3, \
+\
+    '' i (14 + 0) using (0):(0):(18 + 0):(18 + 0 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "blue"        fs transparent solid 0.15 noborder, \
+    '' i (14 + 3) using (0):(0):(18 + 1):(18 + 1 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "dark-orange" fs transparent solid 0.15 noborder, \
+    '' i (14 + 2) using (0):(0):(18 + 2):(18 + 2 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "magenta"     fs transparent solid 0.15 noborder, \
+    '' i (14 + 1) using (0):(0):(18 + 3):(18 + 3 + 3.5 * barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "purple"      fs transparent solid 0.35 noborder, \
+    '' i (14 + 0) using                  (18 + 0 +       barHtScale_fx * $3):2 notitle with steps lc rgb "blue"         lw 0.3, \
+    '' i (14 + 3) using                  (18 + 1 +       barHtScale_fx * $3):2 notitle with steps lc rgb "dark-orange"  lw 0.3, \
+    '' i (14 + 2) using                  (18 + 2 +       barHtScale_fx * $3):2 notitle with steps lc rgb "magenta"      lw 0.3, \
+    '' i (14 + 1) using                  (18 + 3 + 3.5 * barHtScale_fx * $3):2 notitle with steps lc rgb "purple"       lw 0.3, \
+\
+    '' i (18 + 0) using (0):(0):(23 + 0):(23 + 0 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "blue"        fs transparent solid 0.15 noborder, \
+    '' i (18 + 3) using (0):(0):(23 + 1):(23 + 1 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "dark-orange" fs transparent solid 0.15 noborder, \
+    '' i (18 + 2) using (0):(0):(23 + 2):(23 + 2 +       barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "magenta"     fs transparent solid 0.15 noborder, \
+    '' i (18 + 1) using (0):(0):(23 + 3):(23 + 3 + 3.5 * barHtScale_fx * $3):1:2 title columnheader(1) with boxxyerror fc rgb "purple"      fs transparent solid 0.35 noborder, \
+    '' i (18 + 0) using                  (23 + 0 +       barHtScale_fx * $3):2 notitle with steps lc rgb "blue"         lw 0.3, \
+    '' i (18 + 3) using                  (23 + 1 +       barHtScale_fx * $3):2 notitle with steps lc rgb "dark-orange"  lw 0.3, \
+    '' i (18 + 2) using                  (23 + 2 +       barHtScale_fx * $3):2 notitle with steps lc rgb "magenta"      lw 0.3, \
+    '' i (18 + 1) using                  (23 + 3 + 3.5 * barHtScale_fx * $3):2 notitle with steps lc rgb "purple"       lw 0.3
Index: doc/theses/mike_brooks_MMath/plots/list-2ord.py
===================================================================
--- doc/theses/mike_brooks_MMath/plots/list-2ord.py	(revision e35ecd0d30acc83cf5a77153bc63d9d21802b580)
+++ doc/theses/mike_brooks_MMath/plots/list-2ord.py	(revision e35ecd0d30acc83cf5a77153bc63d9d21802b580)
@@ -0,0 +1,64 @@
+import pandas as pd
+import numpy as np
+import os
+import sys
+
+sys.path.insert(0, os.path.dirname(__file__))
+from ListCommon import *
+
+# for mvmt+polarity effects, where lq-list doesn't support queue or inslast
+noLqList = ['cfa-cfa', 'upp-upp', 'lq-tailq']
+
+printHistos(
+    tgtMovement = 'all',
+    tgtPolarity = 'all',
+    tgtAccessor = 'all',
+    lateFilter = { 'machine': ['swift'],
+                   'SizeZone': ['ML'] },
+    drillOn=['machine', 'SizeZone', 'fx'],
+    marginalizeOn=['SizeZone'] )
+
+printHistos(
+    tgtMovement = 'all',
+    tgtPolarity = 'all',
+    tgtAccessor = 'all',
+    lateFilter = { 'machine': ['java'],
+                   'SizeZone': ['ML'] },
+    drillOn=['machine', 'SizeZone', 'fx'],
+    marginalizeOn=['SizeZone'] )
+
+printHistos(
+    tgtMovement = 'all',
+    tgtPolarity = 'all',
+    tgtAccessor = 'all',
+    lateFilter = { 'movement': ['queue'],
+                   'fx': noLqList },
+    drillOn=['movement', 'fx'],
+    marginalizeOn=['movement'] )
+
+printHistos(
+    tgtMovement = 'all',
+    tgtPolarity = 'all',
+    tgtAccessor = 'all',
+    lateFilter = { 'polarity': ['inslast'],
+                   'fx': noLqList },
+    drillOn=['polarity', 'fx'],
+    marginalizeOn=['polarity'] )
+
+printHistos(
+    tgtMovement = 'all',
+    tgtPolarity = 'all',
+    tgtAccessor = 'all',
+    earlyFilter = { 'accessor': ['allhead', 'inselem'] },
+    lateFilter = { 'accessor': ['inselem'] },
+    drillOn=['accessor', 'fx'],
+    marginalizeOn=['accessor'] )
+
+printHistos(
+    tgtMovement = 'all',
+    tgtPolarity = 'all',
+    tgtAccessor = 'all',
+    earlyFilter = { 'accessor': ['allhead', 'remelem'] },
+    lateFilter = { 'accessor': ['remelem'] },
+    drillOn=['accessor', 'fx'],
+    marginalizeOn=['accessor'] )
