Re: Assemblers are for hiding your work , not for faster code .
- From: "Arlet" <usenet+5@xxxxxxxxxx>
- Date: 12 Jan 2007 10:12:33 -0800
John Larkin wrote:
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? How
many bits in a "long long"?
With a good compiler, and CPU that supports 64 bit, the 'a /= 10' could
be translated to a few inline instructions, similar to your hand
written assembly. Some compilers recognize the divide by 10 as a
special case, others may recognize divide by any constant. If the CPU
doesn't natively support 64 bit types, it will most likely be compiled
as a function call.
.
- Follow-Ups:
- References:
- Assemblers are for hiding your work , not for faster code .
- From: werty
- Re: Assemblers are for hiding your work , not for faster code .
- From: ian . okey
- Re: Assemblers are for hiding your work , not for faster code .
- From: Ian Bell
- Re: Assemblers are for hiding your work , not for faster code .
- From: John Larkin
- Re: Assemblers are for hiding your work , not for faster code .
- From: Didi
- Re: Assemblers are for hiding your work , not for faster code .
- From: John Larkin
- Re: Assemblers are for hiding your work , not for faster code .
- From: Didi
- Re: Assemblers are for hiding your work , not for faster code .
- From: werty
- Re: Assemblers are for hiding your work , not for faster code .
- From: John Larkin
- Re: Assemblers are for hiding your work , not for faster code .
- From: John Devereux
- Re: Assemblers are for hiding your work , not for faster code .
- From: John Larkin
- Assemblers are for hiding your work , not for faster code .
- Prev by Date: Re: PCI VGA Controllers
- Next by Date: Re: Assemblers are for hiding your work , not for faster code .
- Previous by thread: Re: Assemblers are for hiding your work , not for faster code .
- Next by thread: Re: Assemblers are for hiding your work , not for faster code .
- Index(es):
Relevant Pages
|