Problem with if/else

To give you some insights in the problems of using delay,
have a look at the following sketch.

It is basically your sketch, enhanced with some test code,
to count loop iterations per second and change the used delay value.
Of course some printing is also needed.
I changed the IO pins to something usable on my test Nano.

const uint8_t sensor1Pin = 2; // 53;
const uint8_t sensor2Pin = 3; // 49;
const uint8_t led1Pin = 12;
const uint8_t led2Pin = 10;

int8_t inconspicuousDelayValue = 12;

bool lowerDelay = true;
uint32_t lastResults;
uint32_t loops;

void setup() {
  pinMode(led1Pin, OUTPUT);
  pinMode(led2Pin, OUTPUT);
  Serial.begin(115200);
}
void loop() {
  digitalWrite(led1Pin, digitalRead(sensor1Pin) == LOW ? HIGH : LOW);
  delay(inconspicuousDelayValue);
  digitalWrite(led2Pin, digitalRead(sensor2Pin) == LOW ? HIGH : LOW);
  delay(inconspicuousDelayValue);

  loops++;
  if (millis() - lastResults >= 1000) {
    Serial.print(F("two delays of "));
    Serial.print(inconspicuousDelayValue);
    Serial.print(F(" millis each result in "));
    Serial.print(loops);
    Serial.println(F(" loops per second"));
    if (lowerDelay) {
      if (--inconspicuousDelayValue < 0) {
        inconspicuousDelayValue = 1;
        lowerDelay = false;
      }
    } else {
      if (++inconspicuousDelayValue > 25) {
        inconspicuousDelayValue = 24;
        lowerDelay = true;
      }
    }
    loops = 0;
    lastResults = millis();
  }
}
two delays of 12 millis each result in 42 loops per second
two delays of 11 millis each result in 46 loops per second
two delays of 10 millis each result in 50 loops per second
two delays of 9 millis each result in 56 loops per second
two delays of 8 millis each result in 63 loops per second
two delays of 7 millis each result in 72 loops per second
two delays of 6 millis each result in 84 loops per second
two delays of 5 millis each result in 100 loops per second
two delays of 4 millis each result in 125 loops per second
two delays of 3 millis each result in 166 loops per second
two delays of 2 millis each result in 248 loops per second
two delays of 1 millis each result in 488 loops per second
two delays of 0 millis each result in 27549 loops per second
two delays of 1 millis each result in 488 loops per second
two delays of 2 millis each result in 248 loops per second
two delays of 3 millis each result in 166 loops per second
two delays of 4 millis each result in 125 loops per second
two delays of 5 millis each result in 100 loops per second
two delays of 6 millis each result in 84 loops per second
two delays of 7 millis each result in 72 loops per second
two delays of 8 millis each result in 63 loops per second
two delays of 9 millis each result in 56 loops per second
two delays of 10 millis each result in 50 loops per second
two delays of 11 millis each result in 46 loops per second
two delays of 12 millis each result in 42 loops per second
two delays of 13 millis each result in 39 loops per second
two delays of 14 millis each result in 36 loops per second
two delays of 15 millis each result in 34 loops per second
two delays of 16 millis each result in 32 loops per second
two delays of 17 millis each result in 30 loops per second
two delays of 18 millis each result in 28 loops per second
two delays of 19 millis each result in 27 loops per second
two delays of 20 millis each result in 25 loops per second
two delays of 21 millis each result in 24 loops per second
two delays of 22 millis each result in 23 loops per second
two delays of 23 millis each result in 22 loops per second
two delays of 24 millis each result in 21 loops per second
two delays of 25 millis each result in 20 loops per second

See how the count without a delay sticks out.

With a baud rate of 115200, roughly 11500 characters arrive through Serial,
with a buffer depth of 64 you need to empty that at least 180 times a second.

I prefer to grab each byte as it comes in, so I don't want any delays in the execution flow.