Robert Roessler wrote:
OK - I just find it [almost] painful to see an strlen being done three
times in a row on the same string... just a dinosaur, I suppose. ;)
I feel the same :-) And so is Neil, which finds "wasteful" to zero 2048
bytes for nothing... :-D
Perhaps still thinking in 8bit 1MHz processors, but well, if they don't
get in the way of good algorithms, micro-optimizations can't hurt.
Note that I saw code like:
for (i = 0; i < strlen(longString); i++)
and even on a fast processor, it was slow!
Of course, in higher level language which stores the length of strings,
the cost is much lighter, but in C, that's costly!
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest