Skip to content

Version 5.0.0

Compare
Choose a tag to compare
@timandy timandy released this 01 Feb 11:13
· 35 commits to master since this release

Release notes

Synchronize changes from .net 5.

Features

  • Add size() and isEmpty() methods for ICollection interface.
  • Add StringSplitOptions.TrimEntries for split() method.
  • Add zip() api to cast three sequence into a Tuple3 sequence.

Changes

  • Improve performance of method ArrayListEnumerable.toArray(Class<TSource> clazz).
  • Optimize allocation of hash sets to reduce the number of resize times. Effected methods toMap,toLinkedMap,toSet,toLinkedSet.
  • Keep first value for duplicated key. Effected methods toMap, toLinkedMap.
  • Return empty sequence instead of throw ArgumentNullException when source is null. Effected methods of, as, chars, words, lines, split.

Tips

  • In order to reduce sorting time, methods first(predicate) and firstOrDefault(predicate) after OrderedEnumerable call the predicate once per element.
    So don't call side-effect methods in linq.
    See dotnet/runtime#31554.
  • Don't reuse the lazy result of skipLast and takeLast when the source will be modified.
    See dotnet/runtime#42506.

Links