Sun, 23 Nov 2025 13:15:19 +0100
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.
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.11.35327.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libucx", "libucx\libucx.vcxproj", "{A7EE56A3-0BAD-4CAB-9354-7FAE2A65E276}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libucx_dll", "libucx_dll\libucx_dll.vcxproj", "{F19429A5-FC21-4639-9D0A-231A6F19DEB4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ucxtest", "ucxtest\ucxtest.vcxproj", "{56337F37-5298-49C4-B4D4-B43C1B2900F0}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ucxtest_dll", "ucxtest_dll\ucxtest_dll.vcxproj", "{13520243-14C7-488E-9389-6CFD5432C54C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {A7EE56A3-0BAD-4CAB-9354-7FAE2A65E276}.Debug|x64.ActiveCfg = Debug|x64 {A7EE56A3-0BAD-4CAB-9354-7FAE2A65E276}.Debug|x64.Build.0 = Debug|x64 {A7EE56A3-0BAD-4CAB-9354-7FAE2A65E276}.Debug|x86.ActiveCfg = Debug|Win32 {A7EE56A3-0BAD-4CAB-9354-7FAE2A65E276}.Debug|x86.Build.0 = Debug|Win32 {A7EE56A3-0BAD-4CAB-9354-7FAE2A65E276}.Release|x64.ActiveCfg = Release|x64 {A7EE56A3-0BAD-4CAB-9354-7FAE2A65E276}.Release|x64.Build.0 = Release|x64 {A7EE56A3-0BAD-4CAB-9354-7FAE2A65E276}.Release|x86.ActiveCfg = Release|Win32 {A7EE56A3-0BAD-4CAB-9354-7FAE2A65E276}.Release|x86.Build.0 = Release|Win32 {F19429A5-FC21-4639-9D0A-231A6F19DEB4}.Debug|x64.ActiveCfg = Debug|x64 {F19429A5-FC21-4639-9D0A-231A6F19DEB4}.Debug|x64.Build.0 = Debug|x64 {F19429A5-FC21-4639-9D0A-231A6F19DEB4}.Debug|x86.ActiveCfg = Debug|Win32 {F19429A5-FC21-4639-9D0A-231A6F19DEB4}.Debug|x86.Build.0 = Debug|Win32 {F19429A5-FC21-4639-9D0A-231A6F19DEB4}.Release|x64.ActiveCfg = Release|x64 {F19429A5-FC21-4639-9D0A-231A6F19DEB4}.Release|x64.Build.0 = Release|x64 {F19429A5-FC21-4639-9D0A-231A6F19DEB4}.Release|x86.ActiveCfg = Release|Win32 {F19429A5-FC21-4639-9D0A-231A6F19DEB4}.Release|x86.Build.0 = Release|Win32 {56337F37-5298-49C4-B4D4-B43C1B2900F0}.Debug|x64.ActiveCfg = Debug|x64 {56337F37-5298-49C4-B4D4-B43C1B2900F0}.Debug|x64.Build.0 = Debug|x64 {56337F37-5298-49C4-B4D4-B43C1B2900F0}.Debug|x86.ActiveCfg = Debug|Win32 {56337F37-5298-49C4-B4D4-B43C1B2900F0}.Debug|x86.Build.0 = Debug|Win32 {56337F37-5298-49C4-B4D4-B43C1B2900F0}.Release|x64.ActiveCfg = Release|x64 {56337F37-5298-49C4-B4D4-B43C1B2900F0}.Release|x64.Build.0 = Release|x64 {56337F37-5298-49C4-B4D4-B43C1B2900F0}.Release|x86.ActiveCfg = Release|Win32 {56337F37-5298-49C4-B4D4-B43C1B2900F0}.Release|x86.Build.0 = Release|Win32 {13520243-14C7-488E-9389-6CFD5432C54C}.Debug|x64.ActiveCfg = Debug|x64 {13520243-14C7-488E-9389-6CFD5432C54C}.Debug|x64.Build.0 = Debug|x64 {13520243-14C7-488E-9389-6CFD5432C54C}.Debug|x86.ActiveCfg = Debug|Win32 {13520243-14C7-488E-9389-6CFD5432C54C}.Debug|x86.Build.0 = Debug|Win32 {13520243-14C7-488E-9389-6CFD5432C54C}.Release|x64.ActiveCfg = Release|x64 {13520243-14C7-488E-9389-6CFD5432C54C}.Release|x64.Build.0 = Release|x64 {13520243-14C7-488E-9389-6CFD5432C54C}.Release|x86.ActiveCfg = Release|Win32 {13520243-14C7-488E-9389-6CFD5432C54C}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C0EC0D10-D742-41ED-ACB4-E88AAF27C9C1} EndGlobalSection EndGlobal