anchor.diff:    LastState:=State;
     State:=State^.NextStates[LocalByteMap[byte(ansichar(LocalInput[Position]))]];
     if not assigned(State) then begin
  -   State:=DFAProcessNextState(LastState,LocalInput[Position],false);
  +   State:=DFAFastProcessNextState(LastState,LocalInput[Position],false);
      if not assigned(State) then begin
       result:=DFAError;
       exit;
  
positive.code:     DFAStartState^.Flags:=SubIndex;
      case Index of
       0:begin
        DFAAddInstructionThread(DFAStartState,Instance.AnchoredStartInstruction);
       end;
       1:begin
        DFAAddInstructionThread(DFAStartState,Instance.UnanchoredStartInstruction);
       end;
       else {2:}begin
        DFAAddInstructionThread(DFAStartState,Instance.ReversedStartInstruction);
       end;
      end;
      DFAStartState^.Flags:=DFAStartState^.Flags or sfDFAStart;
  
negative.code:  end;
  end;
  
  procedure TFLREThreadLocalStorageInstance.DFAFullAddInstructionThread(const State:PFLREDFAState;Instruction:PFLREInstruction;const Flags:longword);
  var StackPointer:longint;
      Stack:PPFLREInstructionsStatic;
  begin
   Stack:=@DFAStackInstructions[0];
   StackPointer:=0;
   Stack^[StackPointer]:=Instruction;
   inc(StackPointer);
   while StackPointer>0 do begin
    dec(StackPointer);
    Instruction:=Stack[StackPointer];
    while assigned(Instruction) and (InstructionGenerations[Instruction^.IndexAndOpcode shr 8]<>Generation) do begin
     InstructionGenerations[Instruction^.IndexAndOpcode shr 8]:=Generation;
     case Instruction^.IndexAndOpcode and $ff of
      opJMP:begin
       Instruction:=Instruction^.Next;
      end;
      opSAVE:begin
  {    if Instruction^.Value=0 then begin
        State.Flags:=State.Flags or sfDFAMatchBegins;
       end;{}
       Instruction:=Instruction^.Next;
      end;
      opSPLIT:begin
       Stack^[StackPointer]:=Instruction^.OtherNext;
       inc(StackPointer);
       Instruction:=Instruction^.Next;
      end;
      opBOL,opEOL,opBOT,opEOT,opBRK,opNBRK,opLOOKBEHINDNEGATIVE,opLOOKBEHINDPOSITIVE,opLOOKAHEADNEGATIVE,opLOOKAHEADPOSITIVE,opBACKREFERENCE,opBACKREFERENCEIGNORECASE:begin
       // No-ops at DFA
       Instruction:=Instruction^.Next;
      end;
      else begin
       if State.CountInstructions>=length(State.Instructions) then begin
        SetLength(State.Instructions,(State.CountInstructions+1)*2);
       end;
       State.Instructions[State.CountInstructions]:=Instruction;
       inc(State.CountInstructions);
       case Instruction^.IndexAndOpcode and $ff of
        opMATCH:begin
         State.Flags:=State.Flags or sfDFAMatchWins;
        end;
       end;
       break;
      end;
     end;
    end;
   end;
  end;
  
  function TFLREThreadLocalStorageInstance.DFAFastProcessNextState(State:PFLREDFAState;const CurrentChar:ansichar;const Reversed:boolean):PFLREDFAState;
  var Counter:longint;
      Instruction:PFLREInstruction;
  begin
  