Delaying after using digitalWrite()

I hope this is the right place to post this; if not, my apologies.

I recently 'inherited' an Arduino sketch for a design project I'm working on, and I noticed in every instance where digitalWrite() is used, a line calling for a 50ms delay immediately follows it, like so:

//Not posting the entire code seeing as it's 850 lines and most are irrelevant
digitalWrite(6, LOW);
delay(50);
digitalWrite(7, LOW);
delay(50);

Is it necessary to have all these delays? They don't add that much time, but I'm trying to optimize the speed with which the sketch runs, and unless taking the delays out will cause digitalWrite to malfunction, I would like to remove these lines if I don't need them.

Anyways, what's the verdict? Do I need these delays?

Thanks,
ECpower2

No you don't need the delays.
A certain type of beginner seems to think it is a good idea but it is not.

The only time you could use it is if you wanted to produce a pulse on one pin. That is not the case in your code.

Excellent, thank you!

You haven't said that the digitalWrite()s actually do. Maybe the wait is essential to give time for something to happen after the value of the output pin changes.

50 millisecs is a long wait for an Arduino. If it is necessary for the project it would be better to replace the use of the delay() function with the technique in the Blink Without Delay example sketch.

...R