From: Arne Vajhøj on
On 15-07-2010 08:44, Sanny wrote:
>> You have revealed nothing of your benchmark. The snippets you show in your
>> response do not do what your original problem statement specified. You don't
>> show your measurement techniques. You don't even explain your testing rigor,
>> much less share the benchmark code.
>>
>> What exactly should I try?
>
> Just try the above for loops and you will see how much time spent in
> both cases.
>
> You have to put extra efforts to create a timer.

Your problem => you do the work !

> I tested these an year back. and found if conditions are taking a lot
> of time than other arithmetic problems.

There are always somebody that have an aunt that had a neighbor
that at some point in time may have heard from someone that <whatever>.

Arne

From: Patricia Shanahan on
Arne Vajh�j wrote:
> On 15-07-2010 08:44, Sanny wrote:
....
>> I tested these an year back. and found if conditions are taking a lot
>> of time than other arithmetic problems.
>
> There are always somebody that have an aunt that had a neighbor
> that at some point in time may have heard from someone that <whatever>.
....

I hope you are not implying that aunts are a particularly unreliable
source of information about computer performance. :-)

Patricia
From: Peter Duniho on
Patricia Shanahan wrote:
> Arne Vajh�j wrote:
>> On 15-07-2010 08:44, Sanny wrote:
> ....
>>> I tested these an year back. and found if conditions are taking a lot
>>> of time than other arithmetic problems.
>>
>> There are always somebody that have an aunt that had a neighbor
>> that at some point in time may have heard from someone that <whatever>.
> ....
>
> I hope you are not implying that aunts are a particularly unreliable
> source of information about computer performance. :-)

Maybe he is, but surely only those without their doctorates.

Or maybe it's neighbors who are unreliable. :)
From: Arne Vajhøj on
On 15-07-2010 20:33, Patricia Shanahan wrote:
> Arne Vajh�j wrote:
>> On 15-07-2010 08:44, Sanny wrote:
> ...
>>> I tested these an year back. and found if conditions are taking a lot
>>> of time than other arithmetic problems.
>>
>> There are always somebody that have an aunt that had a neighbor
>> that at some point in time may have heard from someone that <whatever>.
> ...
>
> I hope you are not implying that aunts are a particularly unreliable
> source of information about computer performance. :-)

Just their neighbors!

:-)

Arne
From: markspace on
RedGrittyBrick wrote:
> On 15/07/2010 14:46, Patricia Shanahan wrote:
>> it is helpful to make your code as ordinary as possible.
>
> That's always been my rule of thumb. Assume compiler writers and chip
> designers are smarter than I am and write the sort of code I would
> expect them to expect.
>


This.

Make the code correct first, including correct OO design and code
structure. Then measure, and optimize as needed.