Robbie Hatley wrote:
> [...]
> memcpy did occur to me, yes. But I'm writing a program which I want to
> be as small and fast as possible, so I'm doing things "manually". [...]
Digging a hole in the ground is a wearisome and tedious
task, and I'd like it to take as little time as possible.
That's why I told that guy with the backhoe to go somewhere
else, threw away my silly old shovel, and am now "doing things
manually" by scrabbling in the dirt with my fingernails.
More seriously, it seems more than a little likely that
you are committing the sin of premature optimization. Until
and unless you have MEASURED a performance problem -- not
hypothecated, not supposed, not "it stands to reason-ed" --
until you have made MEASUREMENTS it is irresponsible folly to
micro-optimize.
"Premature optimization is the root of all evil."
-- D.E. Knuth
"We follow two rules in the matter of optimization:
Rule 1: Don't do it.
Rule 2 (for experts only): Don't do it yet."
-- M.A. Jackson
"More computing sins are committed in the name of efficiency
(without necessarily achieving it) than for any other single
reason, including blind stupidity."
-- W.A. Wulf
In other words, I'm not the only person crying that ab initio
micro-optimization is folly; smart people do so, too. Be smart.
--
Eric Sosman
lid