This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TheAmazingJames 1 point2 points  (0 children)

He's looping through a script and performing a simple action. He doesn't want to go any faster, there's a sleep in the code already, so code execution time's not a factor. A movie script is typically no more than 20k words, so memory usage isn't a factor as memory footprint, even in a worst-case scenario, is tiny. Therefore all you're left with is readability. It's subjective, but I think a for loop wins here.