Looping performance 2 – can I speed it up?

After last tests I was not so surprised, but still proud of myself that found the difference between all in one loop and separated. However, I still felt a bit unsatisfied with possibly existing, other solutions and speed up looping performance. That’s why I decided to implement further modification.

Looping performance 2 - can I speed it up pyjama kid
Continue reading “Looping performance 2 – can I speed it up?”

Looping performance – all in one or separated loops?

Recently I was working on complex tool, which was doing some actions on Excel cells. In some cases it took a while to process whole example data workbook. Thinking how to speed up the code I asked myself what will be better in case of looping performance – all procedures in one loop or all in separated loops?

Looping performance - all in one or separated offspring
Continue reading “Looping performance – all in one or separated loops?”

For vs For Each – which is faster?

Some time ago, when I was learning about looping I read that “You should avoid For Each loop when it is not necessary” or something like that. From that time I was trying to use only For loops. You can imagine my surprise when some guy with over 50k reputation points on StackOverflow said to me encouraging to use For Each, because it is faster! So which is faster – For vs For Each?

for vs for each which is faster

So why not check it? 🙂

Continue reading “For vs For Each – which is faster?”