<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Am 29.11.2022 um 11:08 schrieb Sven
Barth via fpc-devel:<br>
</div>
<blockquote type="cite"
cite="mid:CAFMUeB99mSrkS6Ys6adu8uTh4f0e5mJyV3ROkGGh050u2vQOuw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">J. Gareth Moreton via
fpc-devel <<a
href="mailto:fpc-devel@lists.freepascal.org"
moz-do-not-send="true" class="moz-txt-link-freetext">fpc-devel@lists.freepascal.org</a>>
schrieb am Di., 29. Nov. 2022, 10:09:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Surely
that's a bug in the comparison functions that should be
fixed and <br>
not something that can be blamed on introsort. If a
comparison function <br>
is faulty, then pretty nuch any sorting algorithm can be
considered to <br>
have unpredictable behaviour.<br>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">This *can* be blamed on IntroSort, because
Stability (order of equal elements is kept) is an attribute of
sorting algorithms and IntroSort is *not* considered stable
while QuickSort *can* be stable depending on the
implementation and ours *is*.</div>
</div>
</blockquote>
<p>If for two elements [a, b] the comparison function returns<br>
a<b=true and b<a=true</p>
<p>then the problem is not in stability or any other feature of the
sorting algorithm but in the comparison function indeed. Or am I
missing something?</p>
<p>Ondrej<br>
</p>
</body>
</html>