1

When does it make sense to use Loop fission/distribution if I am compiling for a single core processor?

unj2
  • 52,135
  • 87
  • 247
  • 375

3 Answers3

2

Performance wise? No, it will almost certainly introduce overhead.

Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
0

See comp.compilers for the standard answers.

In addition to that, an odd-ball case that I could think up might be if there is a potential that one of the iterations might block. (e.g. does dynamic memory allocation)

Note that that case is more "abuse" of an easy language "paralel for" than a real numerical reason. (easier to use "for" than to manually do it using threads, even if the FOR waits for all threads to complete)

Marco van de Voort
  • 25,628
  • 5
  • 56
  • 89
-1

Got wonderful answers at comp.compiler

unj2
  • 52,135
  • 87
  • 247
  • 375