The comparison is not the usual C-style comparison as seen with
strcmp or memcmp, but instead first compare based on the length.
This allows both faster lookup and sorting when comparing sparse data.
This ordering scheme is relied on by the string-switching feature.
Code in Druntime's core.internal.switch_ relies on this ordering
when doing a binary search among case statements.
Compare two StringExp by length, then value
The comparison is not the usual C-style comparison as seen with strcmp or memcmp, but instead first compare based on the length. This allows both faster lookup and sorting when comparing sparse data.
This ordering scheme is relied on by the string-switching feature. Code in Druntime's core.internal.switch_ relies on this ordering when doing a binary search among case statements.
Both StringExp should be of the same encoding.