<p dir="auto">by <strong>xuxinhua1984</strong>:</p>
<pre class="notranslate">When I read pkg, I want to know the method exists since which golang version?

Like Java: Since: 1.2  Or PHP (PHP 5 &gt;= 5.3.3)</pre>
<p dir="auto">by <strong>mimenarrator</strong>:</p>
<pre class="notranslate">The Go sort library implements quicksort, which has a worst-case runtime of
O(n^2), and not introsort, with a worst case runtime of O(n*log(n)), as,
for example, GNU's libstdc++ does. Introsort almost always uses the same
algorithm as quicksort, but when pathological cases are detected that lead
to O(n^2) runtime of quicksort (by keeping track of the recursion depth),
heapsort is used instead, since it is guaranteed O(n*log(n)), though on
average slower than quicksort. This is obviously not of the highest
priority, especially given the rarity of pathological cases for the
quicksort implementation used in Go, but they do exist, and can, for
example, but exploited in denial of service attacks.</pre>