On Wed, Oct 20, 2010 at 20:36, Florian Klaempfl <[email protected]> wrote: > Keep also in mind that the extra indirection of ansistrings increases > cache polution (one access touches two instead of one cache line) and > this might not be modelled by the test. So in a real world example > shortstrings have another advantage over ansistrings. Of course, I > suspect that using ansistrings against shortstrings would be hardly > measurable in the compiler speed, but one hundred of such micro > optimizations might make the compiler twice as fast.
All true. However, my main point was that all those micro-optimizations obfuscate the code. One day all this obfuscation may prevent some higher-level optimization, like multi-threading or built-in linking, which would gain more then 2x speedup. Another point: I have actually complained about pchars, not shortstrings. Shortstrings are not any worse than AnsiStrings in usage, until one stays within 255 chars limit. PChars, on the other hand, require manual memory management which is the source of bugs. -- Alexander S. Klenin _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
