Skip to content

Releases: mrdav30/SwiftCollections

SwiftCollections v1.0.9

18 Jun 22:48

Choose a tag to compare

  • New Features
    • Added bulk inserts for SwiftHashSet and SwiftQueue
  • General Updates
    • Updated build scripts to handle release packing
    • Switching zipped release structure from .7z to .zip

Full Changelog: v1.0.8...v1.0.9

SwiftCollections v1.0.8

17 Jun 02:45

Choose a tag to compare

  • Bug Fixes
    • renamed SwiftExtensions.Last to PopLast to avoid conflict with LINQ

SwiftCollections v1.0.7

16 Jun 17:11

Choose a tag to compare

  • New Features
    • Added new collection extension SkipFromEnd
    • Added new default pool SwiftQueuePool

SwiftCollections v1.0.6

14 Jun 20:29

Choose a tag to compare

  • New Features

    • HashTools (formerly HashHelper)
      • Promoted to public and renamed for clarity.
      • Now includes CombineHashCodes(...) methods for safely combining multiple object hashes using a variation of the DJB2 algorithm.
  • Bug Fixes

    • SwiftExtensions
      • Fixed a stack overflow bug in FromEnd(this IEnumerable, int) when the fallback buffer incorrectly wrapped back into itself. It now correctly falls back to SwiftList to preserve intended logic.
  • Refactors & Improvements

    • HashHelper → HashTools
      • Internal helper was renamed to avoid conflicts with .NET internals and better reflect its broader utility.

SwiftCollections v1.0.5

08 Jun 04:03
202c367

Choose a tag to compare

This release brings several important improvements across the collection types, enhanced .NET 8 compatibility, and expanded serialization support.

✨ New Features

  • SwiftQueue

    • Added TryDequeue and TryPeek methods for safer dequeue/peek patterns.
    • Now implements ICollection for improved interoperability and serializer compatibility.
  • SwiftStack

    • Added a custom JsonConverter to ensure proper serialization of stack order under System.Text.Json.
  • SwiftHashSet

    • Renamed Remove to TryRemove for consistent API semantics with other SwiftCollections types.
    • ICollection.Remove mapped to TryRemove.
  • SwiftDictionary

    • Improved indexer behavior — now triggers resize checks when adding new keys via indexer assignment, matching Add behavior.

🔄 Refactors

  • Array3D

    • Reworked internal storage to use a flattened array, improving performance, cache locality, and simplifying future serialization.
    • Added custom JsonConverter for correct and efficient System.Text.Json serialization.
  • Array2D

    • Added custom JsonConverter for efficient and correct serialization under System.Text.Json.

🛠 General Updates

  • SwiftExtensions / HashHelper

    • Added new utility functions to support the recent refactors and conversions.
  • .NET 8 Support

    • SwiftCollections now officially supports targeting .NET 8 in addition to existing frameworks.

Summary

This release makes SwiftCollections more modern, more compatible with .NET 8, and improves performance and API ergonomics across the board. If you are using SwiftQueue, SwiftStack, SwiftDictionary, SwiftHashSet, Array2D, or Array3D, we recommend upgrading to benefit from these improvements.

SwiftCollection v1.0.4

21 Feb 04:15
1d41019

Choose a tag to compare

  • Enhancements:

    • Multithreading Support: Improved thread safety in SwiftBVH by implementing comprehensive locking mechanisms, ensuring reliable concurrent operations.
    • Object Pooling Framework: Introduced the SwiftCollectionPool abstract class, providing a standardized interface for object pooling. This addition enhances memory management and performance.
  • New Features:

    • Default Pool Implementations: Added concrete classes inheriting from SwiftCollectionPool, including SwiftArrayPool, SwiftDictionaryPool, SwiftHashSetPool, and SwiftListPool. These implementations offer ready-to-use pooling solutions for common collection types.
  • Bug Fixes:

    • Race Condition Resolution: Addressed issues in Insert() and Remove() methods to prevent race conditions during concurrent modifications.
  • Testing:

    • Expanded Test Coverage: Added multithreaded unit tests to validate concurrent operations, enhancing overall robustness.

These updates collectively enhance the performance, memory management, and reliability of the SwiftCollections library in multithreaded environments.

SwiftCollections v1.0.3

17 Feb 16:44
6c5c41b

Choose a tag to compare

SwiftCollections v1.0.3 🚀

🔧 Improvements & Enhancements

  • Added LazyDisposable<T> Utility
    • A thread-safe, lazy-initialized disposable wrapper that ensures proper disposal of resources when no longer needed.
    • Supports IDisposable and prevents redundant disposal attempts.
  • Renamed Collection Extension Methods for Clarity & Compatibility
    • AnyIsPopulated
    • IsNotNullOrEmptyIsPopulatedSafe
    • This prevents conflicts with LINQ’s built-in Any() method while maintaining intuitive functionality.

🛠️ Fixes & Optimizations

  • Thread-Safety Improvements in LazyDisposable<T>.
    • Ensures Value is only created once and disposed correctly when needed.
  • Improved Documentation & XML Comments across various collection utilities.
    • Clarifies usage and behavior of key methods.

📦 Package Updates

  • Updated FixedMathSharp to v1.0.4
    • Ensures compatibility with the latest precision math improvements.

🔹 Getting Started

  • Install via NuGet:
    dotnet add package SwiftCollections

For full details, check out the README. 🚀

SwiftCollections v1.0.2

17 Feb 05:21

Choose a tag to compare

  • decouple unity logic

Unity implementation available at https://github.com/mrdav30/SwiftCollections-Unity

SwiftCollections v1.0.1

04 Feb 23:15
da442dc

Choose a tag to compare

🔧 Fix: Resolve object disposal issue in SwiftObjectPool by replacing ConcurrentBag with ConcurrentStack

  • Switched from ConcurrentBag to ConcurrentStack to prevent ThreadLocal disposal errors.
  • Marked _disposed as volatile to ensure proper thread visibility.
  • Ensured safe disposal of pooled objects, preventing premature access errors.
  • Improved overall stability and predictability in multi-threaded environments.

Initial Release

02 Jan 16:24

Choose a tag to compare

SwiftCollections v1.0.0 🎉

🚀 Initial Release

SwiftCollections is a high-performance, memory-efficient collection library designed for speed-critical applications. With a focus on reducing time complexity and memory allocations, this library is optimized for scenarios like game development, real-time processing, and other performance-intensive tasks.

✨ Key Features:

  • SwiftBVH: A self-balancing bounding volume hierarchy for efficient spatial queries.
  • SwiftDictionary: High-performance dictionary optimized for O(1) operations.
  • SwiftHashSet: A fast set implementation for unique value storage.
  • SwiftList: A dynamic list with efficient memory allocation strategies.
  • SwiftBucket: An innovative collection for O(1) stable index operations.
  • SwiftQueue: A circular-buffer-based queue for ultra-low-latency operations.
  • SwiftObjectPool: Reduce GC pressure with reusable object pooling.

✅ What's Included:

  • Full integration with Unity via SwiftCollections.unitypackage.
  • .NET package available via NuGet:
dotnet add package SwiftCollections
  • Comprehensive unit tests for validation.
  • Benchmarks for performance insights.

🌟 Get Started:

Head over to the README for installation instructions and usage examples.