When it's not done by "artificial intelligence," we just call this "mutation testing": https://en.wikipedia.org/wiki/Mutation_testing
> The above algorithm shows what the new and improved libcxx is doing. It's basically quicksort except it switches to the sorting kernels and insertion sort when recursing into smaller slices.
This is a pretty standard technique, isn't it? You can eliminate hella recursive calls just by cutting off the bottom level of the call tree. For instance, take the following (Emacs lisp) functions:
(defun fib1 (n)
(if (or (= n 1) (= n 0))
1
(+ (fib1 (- n 1)) (fib1 (- n 2)))))
(defun fib2 (n)
(if (or (= n 1) (= n 0))
1
(if (= n 2)
2
(+ (fib2 (- n 1)) (fib2 (- n 2))))))
Using the first function to calculate (fib 5) makes 29 recursive calls before finally terminating, while the second only 17.With libcxx I think they even took the added step of schlepping in heapsort, which is kind of slow, but prevents adversaries from smashing your stack.