anchor.diff:                  0
               else
                   terminals |> Seq.map(fun (Terminal(idx, _)) -> idx) |> Seq.max |> int
  -        let arr = Array2D.zeroCreate lalr.Length (maxTerminalIndex + 1)
  +        let arr = createJaggedArray2D lalr.Length (maxTerminalIndex + 1)
           lalr
           |> Seq.iter (fun {Index = stateIndex; Actions = actions} ->
               actions
  -            |> Seq.iter (fun (KeyValue(term, action)) -> action |> Some |> Array2D.set arr (int stateIndex) (int term.Index)))
  +            |> Seq.iter (fun (KeyValue(term, action)) ->
  +                arr.[int stateIndex].[int term.Index] <- Some action))
           arr
   
       let buildLALRGotoArray (nonterminals: ImmutableArray<_>) (lalr: ImmutableArray<_>) =
  
positive.code:         if state.IsError then
              DFAStateTag.Error
          elif isASCII c then
              arr.[state.Value, int c]
          else
              match RangeMap.tryFind c x.Grammar.DFAStates.[state.Value].Edges with
              | ValueSome x -> DFAStateTag.FromOption x
              | ValueNone -> arr.[state.Value, ASCIIUpperBound + 1]
      /// Gets the LALR action from the given state that corresponds to the given terminal.
      member x.GetLALRAction (Terminal (term, _)) {LALRState.Index = idx} =
          x.LALRActionArray.[int idx, int term]
      /// Gets the next LALR state according to the given state's GOTO actions.
      member x.LALRGoto (Nonterminal (nont, _)) {LALRState.Index = idx} =
          x.LALRGotoArray.[int idx, int nont]
  
negative.code: /// performed only once, at the creation of this object.
  type OptimizedOperations = private {
      Grammar: Grammar
      DFAArray: DFAStateTag [][]
      LALRActionArray: LALRAction option [][]
      LALRGotoArray: LALRState option [][]
  }
  with
      static member Create g = {
  