Skip to content

KaosCollections v4.2.0

Latest
Compare
Choose a tag to compare
@kaosborn kaosborn released this 02 Jan 07:30
· 44 commits to master since this release

All binaries built with Visual Studio Community 2017 version 15.8.9.

Changes since v4.1.0

  • Adds optimized Skip and SkipWhile instance methods.

  • Improves enumerator compatibility with Microsoft's Base Class Library.

    • All enumerator types have been converted from class to struct.
    • Calls to the Current property will succeed following updates to the underlying class.

Details

Adds optimized Skip and SkipWhile instance methods

 
Microsoft's IEnumerable version of Skip performs an item-by-item fetching on the target structure. Such an inefficient scan can be optimized when the underlying structure has indexing capability. The instance method versions of Skip in this library execute in logarithmic time rather than scalar time. This optimization applies to any Skip call following any number of Skip or SkipWhile calls.

All enumerator types have been converted from class to struct

 
While it is unlikely that class versus struct is relied on, this is a breaking change for such an edge case.

Calls to the Current property will succeed following updates to the underlying class

 
Microsoft's enumerators permit calls to the Current property after their underlying data structure has been modified. The returned value is whatever a call to Current would have returned before the update. KaosCollections now emulates this behavior.

Previous versions of this library threw an exception here. While it is unlikely that a codebase would rely on an exception, this is a potential breaking change.