.hgtags

Sun, 23 Nov 2025 13:15:19 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 23 Nov 2025 13:15:19 +0100
changeset 1508
dfc0ddd9571e
parent 1280
60123b3db06e
permissions
-rw-r--r--

optimize sorted insertion by using the infimum instead of the supremum

The reason is that the supremum returns the equal element with the smallest index, and we want the largest.
Therefore, we use the infimum, which already gives us the largest index when there are equal elements, and increase the index by one. The infimum is also guaranteed to exist in that case.

a6184aff5108ba849759030fc75df9f4178f6e86 v1.0
9c1591b3c4a4b259de601d1da6cf06e7c445595d v1.0.1
1f9237cfeb265dbb820e673fe5578fb02154766f v1.1
3b985a4eb05b445817d6a17ef516cd23dcaa27fd v2.0
871a8ffe6c9d98192ae11b6eeabe68c729df2655 v2.1
8a3336743c4ebbab46907357851c2f2feb63c2a5 v3.0
18a1a499f0656fcf5c6167cc261c414714b7c633 v3.1

mercurial