News for hackers. Stuff that matters.
Re:Six times faster than C by MisterTea on Friday July 07, 2023 @09:43AM (#36631636)
You can shorten the loop to just tree conditionals:

  while (c = *input++) {
      if (c == 's') r++;
      if (c == 'p') r--;
  }

There are no comments on this comment yet.