Last active
April 13, 2018 16:57
-
-
Save ocoanet/067c79436451605c13d7f487e327c672 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public T this[long sequence] | |
{ | |
get | |
{ | |
ref var firstItem = ref Unsafe.As<object, T>(ref _entries[0]); | |
var index = _bufferPad + (int)(sequence & _indexMask); | |
return Unsafe.Add(ref firstItem, index); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment