[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Low-level vs. High-level programming



"Randy McLaughlin" <randy@nospam.com> wrote in message
news:8Z7Ka.9126$XR4.3297@fe03.atl2.webusenet.com...
> On older machines precise timing was available (counting clock cycles).

On today's machines it's still the same, although normally not with anything
that spans functions:  Managing the cache lines, keeping pipelines full, and
all those sorts of code ordering tricks.  However, it is somewhat possible
to accomplish this from high-level languages by ordering around code, using
simple operations that correspond directly to asm instructions (register int
a; ... a += 3; etc), continually observing the generated assembly code, and
turning off optimizations that overturn what you're trying to manage by
hand.  The nice thing about doing this instead of raw asm is that you can
easily and gradually migrate from a general-case prototype to
processor-specific code.

--
White Flame (aka David Holz)
http://www.white-flame.com/
(spamblock in effect)