Skip to main content

Questions tagged [loops]

A **loop** is a sequence of statements which is specified once but which may be carried out several times in succession.

5 questions with no upvoted or accepted answers
3 votes
0 answers
454 views

Does loop unrolling on a JIT platfrom (.NET or JVM) provide any benefit

I know in C, you can use loop unrolling (unwinding) to help reduce branching in your code but at the expense of program size. That seems to work when you compile to a target machine, however, does it ...
Jetti's user avatar
  • 5,163
3 votes
0 answers
101 views

Loop Unfolding and Named Significant Bits

I've been writing a Parser Compiler for the last seven or so years, and I recently got to the point (yet again, never satisfied) of structuring the portion dealing with the portions of the language ...
Allen Clark Copeland Jr's user avatar
-2 votes
2 answers
621 views

Find index of string in an array of strings where overlap could occur

I am having some trouble writing a variant of sub-string search. Essentially the goal is to write a method that can perform sub-string search except that the source data is in an array of Strings ...
AbuZubair's user avatar
  • 145
-4 votes
1 answer
139 views

Is there any formula or trick to count how many times a statement inside a nested loop gets executed?

I am modifying a software which is for trash collection. While reading the code, I asked myself is there any formula or trick to quickly calculate the number of time the statement gets executed inside ...
AKdeBerg's user avatar
-6 votes
1 answer
383 views

While loop definition in python

My question is about a use of while loops that seems very abstract to me. I understand a while loop like the first one (one which has a clearly defined statement): num = 1 while num<1: ...
stayghostly's user avatar