Re: strlen(), K+1: clarification



On Fri, 22 Feb 2008 08:03:32 -0600, Willem wrote
(in article <slrnfrtlhk.1e9s.willem@xxxxxxxxxxxxxx>):

spinoza1111 wrote:
He made the same mistake as me, and we are quite beyond apologies
given his conduct. strlen is not in essence any slower than a math
operation since it can be a single instruction whereas the math
instruction is in many cases two operations (push the constant, do the
math).

Do you seriously believe that each instruction takes the same amount
of time to process ?

I'm fairly convinced that he may just be intentionally spewing
falsehoods just for the attention it garners. Nobody could this many
things wrong over and over again. His batting average is too bad.

No scientific generalization, only folklore round de campfire,
declares that strlen *must* be slower than subtracting a constant on
all possible machines.

IT IS! What part of O(N) don't you understand ?

My memory is fuzzy on this, but I think that at one point big-O
notation was claimed to be some sort of corporate conspiracy against
the working man in an early dose of Nilgewater. IOW, same old story.

I saw Clive's mistake as the same overall mistake,

I hope you realize now that it is not in fact the same mistake.

I think he does realize it, but it garners more attention if he
pretends otherwise.

A simple "Oh, I see. You're right." would have been enough.

But for a head case that desperately seeks any and all attention, good
or bad, it would have been counterproductive to do so.


--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw





.



Relevant Pages

  • Re: strlen(), K+1: clarification
    ... operation since it can be a single instruction whereas the math ... instruction is in many cases two operations (push the constant, ... invariant subexpression that could have been moved to the initializer: ... thugs here recognized one of their own, ...
    (comp.programming)
  • Re: J4 - presentation/discussion on "Future of the COBOL Standard"
    ... I ask why WOULD it be slower? ... the extra instruction is small compared to the time to execute the move. ... Micro Focus' efficiency advice is exactly the same on every platform, ... becomes zero, rather than incrementing the counter from zero to n. ...
    (comp.lang.cobol)
  • Re: Cobol Myth Busters
    ... Of course, whether adding 5 is slower, or faster, than adding 1 is completely ... Or he was thinking of a LOOP instruction. ... but it gives an insight into optimization. ... Facts incorrectly interpreted are less useful than an absence of facts. ...
    (comp.lang.cobol)
  • Re: interesting use of NEXT SENTENCE vs. CONTINUE
    ... can be SLOWER than a machine language COMPARE instruction that ... > necessarily be presumed *slower* than the case in which the comparison was ... (display the time, including milliseconds, if available, using whatever ... COBOL construct is best on your machine) ...
    (comp.lang.cobol)
  • Re: IF NOTs
    ... a" will will slower than "FALSE a". ... case (executing x) would be slower than the "TRUE b" case (also ... conditional jump instruction. ... zero as needed. ...
    (comp.lang.forth)