As my goal only to demonstrate different approaches I connected to LEDs only 4 out of 8 outputs of 74HC595.
It seems different datasheets have different pin names for 74HC595, so here attached pinout from datasheet.
74HC595 constant connections:
GND (pin 8) to ground,
Vcc (pin 16) to 5V
OE (pin 13) to ground,
SRCLR (MR) (pin 10) to 5V,
1k resistors and 3mm LEDs
Step 2: Simple Approach
Here attached a sketch so to write 8 bits in just 2.8 microseconds. It is 32 times faster than simple approach.
End Of Post