<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 17.08.2017 11:29, Sven Barth via Lazarus wrote:<br>
<blockquote type="cite"
cite="mid:CAFMUeB990UCgsjD30FgbaxJSHpv3PwOZvZQhwVuF0uWSAE9RNQ@mail.gmail.com">
<p>Am 17.08.2017 11:11 schrieb "Michael Schnell via Lazarus" <<a
href="mailto:lazarus@lists.lazarus-ide.org"
moz-do-not-send="true">lazarus@lists.lazarus-ide.org</a>>:<br>
><br>
> Maybe, Sven could answer to this mail in the other
thread...<br>
></p>
<p>I provided an example in my answer to Tony Whyman in the same
subbranch of the thread.</p>
</blockquote>
<br>
I suppose you mean this: <br>
<blockquote type="cite">
<pre wrap="">In a tight loop where one accesss the string character by character
(take Pos() for example) this will lead to a significant slowdown as the
compiler (without optimizations) will have to insert a call to the
lookup function for each access. While I generally don't consider
performance degradation as a backwards compatibility issue I do in this
case, due to the significant decrease in performance.
</pre>
</blockquote>
This is not applicable to the "DynamicString" discussed here. With
that, "pos" would just need to use the "bytes per element" value
taken (once) from the the String header, instead of a value supplied
at compile time. I don't think that this can introduce a
considerable performance hit. <br>
<br>
-Michael<br>
</body>
</html>