Strange behavior with input and output port

~2.7 MHz

void setup()
{
  pinMode(4, OUTPUT);

}

void loop()
{
  noInterrupts();
  
  while (true)
  {
    //~2.7MHz
    PIND = 0x10;  // Toggles pin D04
    //Toggle pins specific to UNO
    //PINB=0x20; //13  PINB=0x10; //12  PINB=0x08; //11  PINB=0x04; //10  PINB=0x02; //9  PINB=0x01; //8
    //PIND=0x80; //7   PIND=0x40; //6   PIND=0x20; //5   PIND=0x10; //4   PIND=0x08; //3  PIND=0x04; //2
  }

  interrupts();
  
}