Skip to content

v2.1.0

Latest
Compare
Choose a tag to compare
@NightOwl888 NightOwl888 released this 20 Oct 16:44
· 11 commits to main since this release

Summary

This release focuses primarily on the following:

  • Increasing support for System.Memory types such as ReadOnlySpan<T> and Span<T>, especially on strings
  • Normalizing behavior of Dictionary<TKey, TValue>, SortedDictionary<TKey, TValue> and SortedSet<T> to be equivalent to .NET 8
  • Reducing allocations by making use of the stack and/or array pool
  • Removing support for old target frameworks
  • Adding support for net8.0

What's Changed

  • Oct 2023 build updates by @NightOwl888 in #52
  • J2N.Numerics: Extended Span support to net45 and netstandard2.0 by @NightOwl888 in #53
  • J2N.Threading.ThreadJob: Don't swallow exceptions when getting/setting Priority by @NightOwl888 in #50
  • J2N.Character: Added ReadOnlySpan overloads for working with codepoints by @NightOwl888 in #54
  • J2N.Tests.Collections.TestBitSet.JDK8BSMethods: Enabled TestEquals() test, removed unnecessary variable initialization by @NightOwl888 in #55
  • J2N.Character: Added overloads of ToChars() and ToString() to reduce allocations by @NightOwl888 in #56
  • J2N.Text.StringBuilderExtensions: Added CopyTo(int, Span, int) … by @NightOwl888 in #59
  • PERFORMANCE: J2N.Text.StringBuilderExtensions: Optimizations by @NightOwl888 in #63
  • PERFORMANCE: J2N.Text.CharArrayExtensions: Optimized CompareToOrdinal() by @NightOwl888 in #67
  • PERFORMANCE: J2N.Character: Optimized CodePointAt(), CodePointBefore(), CodePointCount(), and OffsetByCodePoints() by @NightOwl888 in #65
  • PERFORMANCE: J2N.Text.StringExtensions: Optimized CompareToOrdinal(), ContentEquals(), and RegionMatches() by @NightOwl888 in #66
  • J2N.Text.StringBuilderExtensions::InsertCodePoint(): Fixed xml doc by @NightOwl888 in #71
  • PERFORMANCE: J2N.Text.CharSequenceComparer: Optimized Compare(), Equals() and GetHashCode() implementations by @NightOwl888 in #70
  • J2N.Text: Added ISpanAppendable interface and AppendableExtensions class by @NightOwl888 in #72
  • J2N.Text.StringBuffer: Fixed bugs and added new APIs by @NightOwl888 in #73
  • J2N.Text (CharArrayCharSequence + StringBuilderCharSequence + StringCharSequence): Optimized and fixed several bugs in the Equals() and CompareTo() overloads. by @NightOwl888 in #74
  • PERFORMANCE: J2N.Text.StringBuilderCharSequence: Optimized and fixed several bugs with the IAppendable implementations by @NightOwl888 in #75
  • J2N.Text: Added ValueStringBuilderIndexer for end users - optimizes iteration of StringBuilder via index by @NightOwl888 in #76
  • J2N.Text.StringExtensions, J2N.Memory.MemoryExtensions: Added optimized ReverseText() methods by @NightOwl888 in #77
  • J2N.Character: Added overloads of CodePointAt() and CodePointBefore() by @NightOwl888 in #78
  • PERFORMANCE: Added target for net462 by @NightOwl888 in #79
  • PERFORMANCE: J2N.Character::ToString(): Improved both memory usage and speed by using String.Create() and ArrayPool, when supported. by @NightOwl888 in #81
  • J2N.Text.StringExtensions::ReverseText(): Use String.Create() for optimal performance, when supported by @NightOwl888 in #82
  • PERFORMANCE: J2N.Character: Optimized ToUpper() and ToLower() and added ToUpperInvariant() and ToLowerInvariant() by @NightOwl888 in #84
  • PERFORMANCE: Removed ValueStringBuilder and reworked methods that used it to use stack/array pool explicitly by @NightOwl888 in #85
  • J2N.Text (CharArrayExtensions + StringBuilderExtensions + StringExtensions): Added ReadOnlySpan overload of CompareToOrdinal() by @NightOwl888 in #86
  • J2N.Text.StringBuilderExtensions: Added Replace() overload that accepts ReadOnlySpan by @NightOwl888 in #87
  • J2N.MemoryExtensions: Added IndexOf(codePoint) and LastIndexOf(codePoint) extension methods by @NightOwl888 in #88
  • J2N.Text.StringExtensions: Added ReadOnlySpan overload of ContentEquals() by @NightOwl888 in #89
  • J2N.Text.StringExtensions: Added ReadOnlySpan overload to RegionMatches() by @NightOwl888 in #90
  • Added support for Span/ReadOnlySpan in net40 by @NightOwl888 in #92
  • Removed tests and CI for Xamarin, as they are now obsolete by @NightOwl888 in #96
  • Removed FEATURE_ARRAYPOOL by @NightOwl888 in #97
  • Removed FEATURE_SPAN and FEATURE_READONLYMEMORY by @NightOwl888 in #98
  • J2N.Collections: Added AsReadOnly() method to each dictionary and set by @NightOwl888 in #100
  • PERFORMANCE: J2N.Text.StringBuilderExtensions::Replace(): Reuse expansion memory by @NightOwl888 in #101
  • azure-pipelines.yml: Use deep clone for Nerdbank.GitVersioning by @NightOwl888 in #102
  • J2N.Character: Added overload of ToChars() that accepts a Span and returns ReadOnlySpan by @NightOwl888 in #103
  • J2N.Runtime.InteropServices: Added CollectionMarshal class by @NightOwl888 in #99
  • Upgraded Dictionary<TKey, TValue> to use a low level (rather than a wrapped) implementation by @NightOwl888 in #104
  • Added net8.0 target and tests (Fixes #94) by @NightOwl888 in #110
  • Reverted breaking API changes for 2.1.0 so we don't have to bump to 3.0.0 by @NightOwl888 in #113

Full Changelog: v2.0.0...v2.1.0