Changed stupid mistake in key strategies

now strategies faster. go wroom.
This commit is contained in:
Linus Björnstam 2026-04-18 23:20:36 +02:00
parent c3b9268cf1
commit ae3e8ae8c4

View file

@ -85,6 +85,8 @@ public struct UnicodeStrategy : IKeyStrategy<string>
// Essential for the < and > operators to work correctly. // Essential for the < and > operators to work correctly.
return packed ^ unchecked((long)0x8080808080808080); return packed ^ unchecked((long)0x8080808080808080);
} }
public bool UsesPrefixes => true;
} }
public struct IntStrategy : IKeyStrategy<int> public struct IntStrategy : IKeyStrategy<int>
@ -101,6 +103,10 @@ public struct IntStrategy : IKeyStrategy<int>
// though standard int shifting usually works fine for direct mapping. // though standard int shifting usually works fine for direct mapping.
return (long)key << 32; return (long)key << 32;
} }
public bool UsesPrefixes => true;
public bool IsLossless => true;
} }
public struct DoubleStrategy : IKeyStrategy<double> public struct DoubleStrategy : IKeyStrategy<double>