Hacker News new | ask | show | jobs
by oscardelben 4279 days ago
One of their offering under technology is converting computer programs with loops to ones without loops. Can anyone help me understand what the point of that is?
4 comments

To make it easier to reason about whether the program will terminate. This is an important part of writing high-assurance software.

From the actual patent text (https://www.google.com/patents/US7788659): "Because of the possibility of looping and branching within loops, a brute force attempt to enumerate the paths through a computer program will most likely fail. Therefore, there is a need for a method of converting a computer program that contains loops to one that does not."

More info: https://en.wikipedia.org/wiki/Termination_analysis

It's called loop unrolling. Most optimizing compilers do it to increase performance. The most obvious gain is that you minimize your branch penalty.

The Wikipedia article on it is quite good with examples: https://en.wikipedia.org/wiki/Loop_unrolling

Some twist on loop unrolling[1] perhaps.

[1] http://en.wikipedia.org/wiki/Loop_unrolling

autoparallelization