All Questions
Tagged with loops optimization
5
questions
4
votes
2
answers
135
views
Separation of data retrieval and processing in loops?
Often I need to get some data and process it in some way. For example getting a list of customers from an API and assemble some summary data on them. As an example, getting :
api_result = api.request(...
3
votes
3
answers
392
views
Is loop unrolling one of the examples of "targeted" compilation and faster instruction set?
I'm taking the Computer Architecture course in my undergraduate study.
I see that in loop unrolling, one of the constraints is the number of available registers.
Since the number of registers ...
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 ...
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 ...
0
votes
4
answers
284
views
Use functions inside a loop declaration
What's the best practice?
This :
for ($i = 0; $i < count($array); $i++) {
//stuff
}
Or, what I usually do :
$count = count($array);
for($i = 0; $i < $count; $i++) {
//stuff
}
Is it the same ...