Changed stupid mistake in key strategies
now strategies faster. go wroom.
This commit is contained in:
parent
c3b9268cf1
commit
ae3e8ae8c4
1 changed files with 6 additions and 0 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue