The regex to extract the number would run on every iteration of sort, which resulted in almost 500ms of just regex computations in some cases.
This introduces an anonymous struct that stores the number and its key. By this we can run regex once and later sort according to the number in the struct.
Coverage increased (+0.1%) to 86.204% when pulling 65f10b144606a6a69f18270df9c13c345834c188 on efficient_umbr_sort into 8ef0ac6e572592b75a537dc260045a1932f762ee on master.
The regex to extract the number would run on every iteration of sort, which resulted in almost 500ms of just regex computations in some cases.
This introduces an anonymous struct that stores the number and its key. By this we can run regex once and later sort according to the number in the struct.