On Wednesday, 23 May 2018 at 03:12:52 UTC, IntegratedDimensions
wrote:
On Wednesday, 23 May 2018 at 03:00:17 UTC, Nicholas Wilson
wrote:
[...]
I knew someone was going to say that and I forgot to say DON'T!
Saying to profile when I clearly said these ARE cases where
they are slow is just mor
On Wednesday, 23 May 2018 at 03:12:52 UTC, IntegratedDimensions
wrote:
I knew someone was going to say that and I forgot to say DON'T!
Saying to profile when I clearly said these ARE cases where
they are slow is just moronic. Please don't use default answers
to arguments.
This was a general
On Wednesday, 23 May 2018 at 10:55:02 UTC, Malte wrote:
On Wednesday, 23 May 2018 at 02:24:08 UTC, IntegratedDimensions
wrote:
[...]
I would just do
[...]
[...]
Thanks, I didn't think about using a for loop like that. While it
is not the most general it does solve the specific case for
On Wednesday, 23 May 2018 at 02:24:08 UTC, IntegratedDimensions
wrote:
In some cases the decision holds for continuous ranges. For
some 0 <= n <= N the decision is constant, but n is
arbitrary(determined by unknown factors at compile time).
One can speed up the routine by using something akin
On Wednesday, 23 May 2018 at 03:00:17 UTC, Nicholas Wilson wrote:
On Wednesday, 23 May 2018 at 02:24:08 UTC, IntegratedDimensions
wrote:
Many times in expensive loops one must make decisions.
Decisions must be determined and the determination costs.
for(int i = 0; i < N; i++)
{
if(decisi
On Wednesday, 23 May 2018 at 02:24:08 UTC, IntegratedDimensions
wrote:
Many times in expensive loops one must make decisions.
Decisions must be determined and the determination costs.
for(int i = 0; i < N; i++)
{
if(decision(i)) A; else B;
}
the if statement costs N times the cycle cost.
Many times in expensive loops one must make decisions. Decisions
must be determined and the determination costs.
for(int i = 0; i < N; i++)
{
if(decision(i)) A; else B;
}
the if statement costs N times the cycle cost.
In some cases the decision holds for continuous ranges. For some
0 <=