<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-template">Hi,<br>
<br>
<blockquote type="cite"><br>
That 99.99% of people does use it, indicates they simply take
the overhead because
<br>
of the advantages that the managed types offer.
</blockquote>
<br>
Or they simply do not know about the overhead</div>
<div><br>
Like I was writing all my code on Windows 98, and never noticed
any overhead, until I started running benchmarks on Linux. <br>
<br>
Bye,<br>
Benito <br>
</div>
<div class="moz-cite-prefix">On 25.05.23 07:58, Michael Van Canneyt
via fpc-pascal wrote:<br>
</div>
<blockquote type="cite"
cite="mid:alpine.DEB.2.22.394.2305250747530.535874@home">
<br>
<br>
On Thu, 25 May 2023, Hairy Pixels via fpc-pascal wrote:
<br>
<br>
<blockquote type="cite">
<br>
<br>
<blockquote type="cite">On May 24, 2023, at 10:11 PM, Sven Barth
via fpc-pascal <a class="moz-txt-link-rfc2396E" href="mailto:fpc-pascal@lists.freepascal.org"><fpc-pascal@lists.freepascal.org></a> wrote:
<br>
<br>
You must have $H+ on and those are AnsiStrings? Why is there
exception handling involved with AnsiString? I guess it needs
this just in case an exception is thrown somewhere in the call
stack?
<br>
<br>
Because Ansi- and UnicodeString are managed types. *All*
managed types managed string types, interfaces, Variants,
managed records) must be finalized correctly even if an
exception occurs.
<br>
<br>
</blockquote>
<br>
That's a problem with exceptions then, they are baked into the
language
<br>
and impose a cost on all managed types now even if we use them
or not. Even disabling the implicit stack frames (forgot what
it's called) doesn't
<br>
get around this right?
<br>
</blockquote>
<br>
Why do you insist it is a problem ?
<br>
<br>
Simply don't use managed types and don't use exceptions if you
don't like the
<br>
overhead they cause. It's still perfectly possible: avoid the
sysutils unit
<br>
and you're all set. The system unit does not use exceptions.
<br>
<br>
That 99.99% of people does use it, indicates they simply take the
overhead because
<br>
of the advantages that the managed types offer.
<br>
<br>
Which is not to say that FPC should not strive to minimize the
overhead.
<br>
Conceivably there is some gain possible on non-windows platforms.
<br>
<br>
Michael.
<br>
_______________________________________________
<br>
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a>
<br>
</blockquote>
</body>
</html>