Wednesday 15 August 2012

performance - Is it more efficient to iterate often or process intensive? -



performance - Is it more efficient to iterate often or process intensive? -

i have lot of text processing scripts apply on lot of text files. writing batch script (on win 7) start them , iterate through directories , subdirectories containing text files. actually, wondering if there preferable way of iterating more or executing more processes during 1 iteration regarding efficieny:

variant a

for x in y process 1 on x process 2 on x process 3 on x

or variant b

for x in y process 1 on x x in y process 2 on x x in y process 3 on x

thank in advance!

that depends on size of loop, amount of processes , resources required processes (and programming language utilize ofcourse ;)) best way figure out creating test script, give both methods go , see whitch fastest.

if difference small, go cleanest solution, utilize 1 loop executing multiple processes... becuase easier read.

performance batch-file iteration

No comments:

Post a Comment