title: array vs vector vs list
body: <p>I am maintaining a fixed-length table of 10 entries. Each item is a structure of like 4 fields. There will be insert, update and delete operations, specified by numeric position. I am wondering which is the best data structure to use to maintain this table of information:</p>
  
  <ol>
  <li><p>array - insert/delete takes linear time due to shifting; update takes constant time; no space is used for pointers; accessing an item using [] is faster.</p></li>
  <li><p>stl vector - insert/delete takes linear time due to shifting; update takes constant time; no space is used for pointers; accessing an item is slower than an array since it is a call to operator[] and a linked list .</p></li>
  <li><p>stl list - insert and delete takes linear time since you need to iterate to a specific position before applying the insert/delete; additional space is needed for pointers; accessing an item is slower than an array since it is a linked list linear traversal.</p></li>
  </ol>
  
  <p>Right now, my choice is to use an array. Is it justifiable? Or did I miss something?</p>
  
  <p>Which is faster: traversing a list, then inserting a node or shifting items in an array to produce an empty position then inserting the item in that position?</p>
  
  <p>What is the best way to measure this performance? Can I just display the timestamp before and after the operations?</p>