Re: Assemblers are for hiding your work , not for faster code .



John Larkin <jjlarkin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:

On Fri, 12 Jan 2007 12:46:57 +0000, John Devereux
<jdREMOVE@xxxxxxxxxxxxxxxxxx> wrote:

John Larkin <jjlarkin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:

The point is not to be fast, but to be right.

<SNIP>

OK, show us some code.

unsigned long long a;

.
.
.
.

a /= 10;

And yes, all good people hate C.

:)

How many bytes does that compile to? What's the execution time?

"The point is not to be fast, but to be right."

(Of course the answer to you questions will depend on the
processor. For me, on an ARM7 CPU, the 32 bit version compiled into a
few inline instructions. But the 64 bit version called a library
routine).

How many bits in a "long long"?

The C standard guarantees at least 64. You can also use uint64_t
(instead of long long), if the platform supports it.

--

John Devereux
.



Relevant Pages