hi silvia, adam,

when looking at callgrind from a high mu sample, i realized that over 80% of the time in missinget is spend in just one line.

this patch fixes this:
&gt; svn diff
index: missingetevent/missingetmap.icc
===================================================================
--- missingetevent/missingetmap.icc     (revision 454375)
+++ missingetevent/missingetmap.icc     (working copy)
@@ -448,10 +448,12 @@
 typename missingetmap&lt;keyobject,refstore&gt;::iiterator 
 missingetmap&lt;keyobject,refstore&gt;::getiiterator(size_t ikey)
 {
-  iiterator fiter(m_store.begin());
+  // iiterator fiter(m_store.begin());
   size_t ictr(0);
-  while ( fiter != m_store.end() &amp;&amp; ictr &lt; ikey ) { ++fiter; ++ictr; }
-  return fiter;
+  // while ( fiter != m_store.end() &amp;&amp; ictr &lt; ikey ) { ++fiter; ++ictr; }
+  // return fiter;
+  ictr =  ikey &lt; m_store.size() ? ikey : m_store.size();
+  return (m_store.begin()+ictr);
 }
 
 template&lt;typename keyobject,typename refstore&gt;

this of course makes use of the fact that m_store is in fact a vector.
i hope the optimizer will optimize away ictr.

the timings from chronostatsvc are after/before the patch:
new/q120/log.q120:metrefalgmu:execute                                  info time user   : tot=   26 [ms] ave/min/max=  2.6(+- 0.49)/    2/    3 [ms] #= 10
new/q120/log.q120:metrefalg_em:execute                                 info time user   : tot=   36 [ms] ave/min/max=  3.6(+- 0.49)/    3/    4 [ms] #= 10
new/q120/log.q120:metrefalgmuid:execute                                
info time user   : tot=   36 [ms] ave/min/max=  3.6(+- 0.49)/    3/    4 [ms] #= 10
new/q120/log.q120:metrefalg:execute                                    info time user   : tot=   47 [ms] ave/min/max=  4.7(+- 2.57)/    3/   12 [ms] #= 10
new/q122/log.q122:metrefalgmu:execute                                  info time user   : tot=   40 [ms] ave/min/max=    4(+-    1)/    2/    6 [ms] #= 10
new/q122/log.q122:metrefalg_em:execute                                 info time user   : tot=  161 [ms] ave/min/max= 16.1(+- 5.47)/    8/   29 [ms] #= 10
new/q122/log.q122:metrefalgmuid:execute                                info time user   : tot=  287 [ms] ave/min/max= 28.7(+- 9.54)/    9/   43 [ms] #= 10
new/q122/log.q122:metrefalg:execute                                    info time user   : tot=  316 [ms] ave/min/max= 31.6(+- 11.5)/    9/   49 [ms] #= 10
pcmpp002[3]:/tmp/seuster/metnew &gt; grep &quot;^metref&quot; q12?/log.q12? | grep execute
q120/log.q120:metrefalgmu:execute                                  info time user   : tot=   29 [ms] ave/min/max=  2.9(+-  0.7)/    2/    4 [ms] #= 10
q120/log.q120:metrefalgmuid:execute                                info time user   : tot=   43 [ms] ave/min/max=  4.3(+-  1.1)/    3/    6 [ms] #= 10
q120/log.q120:metrefalg_em:execute                                 info time user   : tot=   44 [ms] ave/min/max=  4.4(+- 1.02)/    3/    6 [ms] #= 10
q120/log.q120:metrefalg:execute                                    info time user   : tot=   58 [ms] ave/min/max=  5.8(+- 2.93)/    3/   14 [ms] #= 10
q122/log.q122:metrefalgmu:execute                                  info time user   : tot=   36 [ms] ave/min/max=  3.6(+- 1.02)/    3/    6 [ms] #= 10
q122/log.q122:metrefalgmuid:execute                                info time user   : tot=0.743  [s] ave/min/max= 74.3(+- 51.3)/   12/  178 [ms] #= 10
q122/log.q122:metrefalg:execute                                    info time user   : tot= 1.06  [s] ave/min/max=  106(+- 65.1)/   13/  237 [ms] #= 10
q122/log.q122:metrefalg_em:execute                                 info time user   : tot= 1.45  [s] ave/min/max=  145(+-  101)/   11/  348 [ms] #= 10

i checked that the results for missinget haven't changed, i checked with devval, rel_4.

could you check that with 17.0.x.y this is still the case - no change - and request for 17.0.x.y ?

thanks, rolf
