•Use "linked lists" instead of adding to a list

The most straight forward way of adding to a list uses PrependTo or AppendTo as in the next cell. There are a number of other ways you could effectively do the same thing but they are all very slow for making long lists. As an example consider the program in the next cell which makes a list by prepending values.

     lst1 = {} ;
     Do[(y = Sin[20.0 t] ; If[Positive[y], PrependTo[lst1, y]] ;),  
      
         {t, 0, 10^4}] // Timing
     {4.22999999999999` Second, Null}

The faster way to build the list in the previous cell is to make a linked list which looks like  
{... ,y4,{y3,{y2,{y1}}}} instead of {...  ,y4,y3,y2,y1} as returned by the program in the previous cell. Flatten can then be used to convert the linked list into a flattened list.

     lst2 = {} ;
     Do[(y = Sin[20.0 t] ; If[Positive[y], lst2 = {y, lst2}] ;),  
      
         {t, 0, 10^4}] // Timing
     {0.3900000000000148` Second, Null}
     lst1 == Flatten[lst2]
     True

However a temporary head is needed if you want to quickly build up a list such as
{... ,{x4,y4},{x3,y3},{x2,y2},{x1,y1}}. In that case an expression with the form
h[{x4,y4},h[{x3,y3},h[{x2,y2},h[x1,y2]]]] can be built-up. Then you can get the desired result by flattening the nested list and changing the head (h) to List. This is done in the next two cells.

     lst2 = h[] ;
     Do[(y = Sin[20.0 t] ; If[Positive[y], lst2 = h[{t, y}, lst2]] ;),
      
           {t, 0, 12}] 
     lst2
     h[{12, 0.9454451549211168`}, 
      
        h[{11, 0.08839871248753149`}, 
      
          h[{8, 0.21942525837900473`}, 
      
            h[{7, 0.9802396594403116`}, 
      
              h[{6, 0.5806111842123143`}, 
      
                h[{2, 0.7451131604793488`}, 
      
                  h[{1, 0.9129452507276277`}, h[]]]]]]]]
     lst2 = Flatten[lst2] /. h -> List
     {{12, 0.9454451549211168`}, {11, 0.08839871248753149`}, 
      
        {8, 0.21942525837900473`}, {7, 0.9802396594403116`}, 
      
        {6, 0.5806111842123143`}, {2, 0.7451131604793488`}, 
      
        {1, 0.9129452507276277`}}