anchor.diff:                      Map.add nonterminal edges gotoEdges)
   
               let startSymbolCount = Set.count processedSpec.StartSymbols
  -            let gotos = ResizeArray ()
  +            let gotos =
  +                // Initialize to a reasonable size to avoid small re-allocations.
  +                ResizeArray (4 * gotoEdges.Count)
               let offsets = Array.zeroCreate (startSymbolCount + gotoEdges.Count)
   
               // Add entries for the "fake" starting nonterminals.
  
positive.code:                                 compare tag1 tag2)
  
                      // The entries for this state.
                      let elements = Array.zeroCreate <| 2 * (Array.length entries + 1)
                      elements.[0] <- Checked.uint16 <| Array.length entries
                      elements.[1] <- mostFrequentActionValue
                      
                      entries
                      |> Array.iteri (fun i (terminalTag, actionValue) ->
                          let idx = 2 * (i + 1)
                          elements.[idx] <- terminalTag
                          elements.[idx + 1] <- actionValue)
                      elements)
  
              let actionTableElements =
                  // Initialize to roughly the correct size (to avoid multiple small reallocations).
  
negative.code:             (startSymbolCount, gotoEdges)
              ||> Map.fold (fun nonterminalIndex nonterminal edges ->
                  // Store the starting index (in the sparse GOTO table) for this nonterminal.
                  offsets.[nonterminalIndex] <- Checked.uint16 (gotos.Count / 2)
  
                  // Add the number of edges and the "any" action to the sparse GOTOs table.
                  gotos.Add (uint16 <| Set.count edges)
  