Commit Graph
100 Commits
Author SHA1 Message Date
mlemanczyk ef670dbf2d Additional test object count combinations added. 2023-04-30 21:54:51 +02:00
mlemanczyk 8d199d83e3 Visual Studio Code settings added. 2023-04-30 21:52:46 +02:00
mlemanczyk 112a482583 Additional POC benchmarks added. 2023-04-30 21:51:46 +02:00
mlemanczyk 8ccd129bd6 RecyclableList.IndexOf benchmark for all items added 2023-04-30 21:44:17 +02:00
mlemanczyk 0951b442ae Compilation warnings resolved 2023-04-30 21:42:06 +02:00
mlemanczyk 450701f800 RecyclableList.EnsureCapacity v3 benchmarks added. 2023-04-30 21:38:45 +02:00
mlemanczyk 46b074a35c Benchmark organization improvements to reuse code. 2023-04-30 21:24:12 +02:00
mlemanczyk c45af6a884 Test data item type changed to "long" for performance reasons. 2023-04-30 21:01:28 +02:00
mlemanczyk abfe476573 RecyclableList.MemoryBlocks renamed to AsArray. 2023-04-25 02:03:13 +02:00
mlemanczyk 49682fd733 Tiny cleanup 2023-04-25 01:55:39 +02:00
mlemanczyk aa78a2ba40 Dirty RecyclableList.IndexOf parallelization implemented. 2023-04-25 01:51:22 +02:00
mlemanczyk 1bdf0404e4 RecyclableList._blockSizePow2Shift renamed to _blockSizePow2BitShift. Public property added to help avoiding recalculations. 2023-04-25 01:42:56 +02:00
mlemanczyk 79cb86fbce Added missing cell clear to release the requested array, if needed. 2023-04-18 00:21:01 +02:00
mlemanczyk 5ac21f5d18 RecyclableList.Resize & .Clear performance improvements. 2023-04-18 00:20:07 +02:00
mlemanczyk e5c0b2a231 RecyclableList._blockPoolingRequired removed for better performance. 2023-04-17 01:48:02 +02:00
mlemanczyk 4600c4521e RecyclableList.Resize performance improvements. 2023-04-17 00:11:23 +02:00
mlemanczyk 60494c3219 RecyclableList.Resize performance improvements. 2023-04-16 15:32:03 +02:00
mlemanczyk ed11e42b48 BoolOrComparePoc benchmarks added to confirm findings from RecyclableList.EnsureCapacity runs. 2023-04-13 03:54:01 +02:00
mlemanczyk 22060c4390 Tiny cleanup 2023-04-12 23:57:17 +02:00
mlemanczyk ef09143eb1 Benchmark results updated. 2023-04-12 23:56:07 +02:00
mlemanczyk 6fb6ec3f07 RecyclableList performance improvements. 2023-04-12 23:44:07 +02:00
mlemanczyk 9609b77a52 Additional benchmarks added. 2023-04-12 23:39:25 +02:00
mlemanczyk 3cb0a47c60 RecyclableCollectionsBenchmarks split into multiple files. 2023-04-12 23:36:11 +02:00
mlemanczyk 0449700244 RecyclableList.EnsureCapacity performance improvement. 2023-04-11 21:24:28 +02:00
mlemanczyk 9cb9aa8bf0 ArraySizeLimitPocBenchmarks reworked. 2023-04-11 20:38:25 +02:00
mlemanczyk 098d862a3c x64 platform added. 2023-04-11 20:33:59 +02:00
mlemanczyk 595566d0b9 The current maximum pooled block size, from testing, added. 2023-04-11 20:31:34 +02:00
mlemanczyk 7c7740b27c RecyclableList performance improvements to pre-calculate the value of _blockSize - 1 & store it under _blockSizeMinus1 2023-04-11 20:30:34 +02:00
mlemanczyk abbd568c6b RecyclableList.LastTakenBlockIndex renamed to LastBlockWithData. Tiny cleanup. 2023-04-11 20:24:26 +02:00
mlemanczyk 2d7e62df72 Benchmarks mostly reorganized & cleaned up. Simplified for re-runs. 2023-04-11 16:42:06 +02:00
mlemanczyk eae5cb4452 Changed all benchmarks to be non-baseline by default. Missing parameters added everywhere. 2023-04-11 00:46:22 +02:00
mlemanczyk 24a14f810b Additional benchmarks added. One-off quick smoke test added. 2023-04-11 00:16:05 +02:00
mlemanczyk 91515cb76b Typo fixed. Basic RecyclableList.Resize documentation added. 2023-04-11 00:13:59 +02:00
mlemanczyk 0063f11ff5 Clear mode set to ClearMode.Always in PooledList benchmarks to have fair comparison on worst case. 2023-04-11 00:12:53 +02:00
mlemanczyk 767892a9eb Array_IndexOf_FirstItems benchmark added. 2023-04-10 23:07:51 +02:00
mlemanczyk 6b2db42d0d Partial support for items counts exceeding int.MaxValue 2023-04-10 22:56:02 +02:00
mlemanczyk fdea416dc1 RecyclableList[index] tests added for get. 2023-04-10 22:37:15 +02:00
mlemanczyk 4165c9c6d9 RecyclableList.EnsureCapacity & .Resize performance improvements. Custom ArrayPool<T> added. 2023-04-10 22:35:00 +02:00
mlemanczyk 7f84cdc636 RecyclableList.Resize performance improvements. 2023-04-09 03:10:46 +02:00
mlemanczyk a132fdc775 RecyclableList.EnsureCapacity performance improvements. 2023-04-09 01:54:52 +02:00
mlemanczyk ed76bd99ba Failing tests fixed. 2023-04-09 01:51:58 +02:00
mlemanczyk 298af4e718 Arithmetic overflow protections added. 2023-04-09 00:50:12 +02:00
mlemanczyk b7af797dd7 Tiny cleanup 2023-04-08 01:15:27 +02:00
mlemanczyk dead323502 RecyclableArrayList.Remove & .RemoveAt performance improvements. 2023-04-08 01:13:37 +02:00
mlemanczyk fd9c2dab82 RecyclableList.Remove & .RemoveAt performance improvements. 2023-04-08 01:02:11 +02:00
mlemanczyk 3369bcc6cb RecyclableList.Remove & .RemoveAt performance improvements. 2023-04-08 00:34:23 +02:00
mlemanczyk 064b3f0cb0 .Remove & .RemoveAt benchmarks added. 2023-04-07 23:34:43 +02:00
mlemanczyk 1ce91c0062 RecyclableArrayList.Remove, RecyclableArrayList.RemoveAt, RecyclableList.Remove & RecyclableList.RemoveAt performance improvements.
Support for removal of any item implemented in RecyclableList.Remove & .RemoveAt.
2023-04-07 01:09:25 +02:00
mlemanczyk d6b351b1eb RecyclableList.DoIndexOf multiplication changed to bit shifting for better performance. 2023-04-01 20:01:34 +02:00
mlemanczyk 80756aff44 RecyclableList.RemoveAt fix to release the rented block correctly. 2023-04-01 20:00:32 +02:00
mlemanczyk 239d45fc8c RecyclableArrayList.IndexOf improved to not raise exception when the list is empty. 2023-04-01 16:38:53 +02:00
mlemanczyk 4500484831 RecyclableArrayList.IndexOf performance improvements. 2023-04-01 13:54:53 +02:00
mlemanczyk d79dc4fb86 Tiny cleanup 2023-03-30 20:29:36 +02:00
mlemanczyk 83f5b2ddc1 All benchmarks enabled by default 2023-03-30 19:45:49 +02:00
mlemanczyk a2694a0b87 Benchmark results added. 2023-03-30 19:39:34 +02:00
mlemanczyk 07f1ee6880 Benchmarks for Collections.Pooled added 2023-03-30 19:36:03 +02:00
mlemanczyk d1e0482693 RecyclableList.SetNewLength renamed to RecyclableList.Resize & performance improved. 2023-03-30 19:33:55 +02:00
mlemanczyk 8c0d3c5fbc Responsibility for rounding RecyclableList.minBlockSize up to the closest & highest power of 2 moved to .SetNewLength. 2023-03-27 01:53:09 +02:00
mlemanczyk 1f86ef2c59 MathUtils.IsPow2 & MathUtils.GetPow2Shift performance improvements. 2023-03-27 01:12:39 +02:00
mlemanczyk b33904a17f RecyclableList.BlockSize enforced to be the power of 2 2023-03-27 01:10:54 +02:00
mlemanczyk 3f986c75a2 Additional benchmarks added to compare iterations over RecyclableList. 2023-03-27 00:00:42 +02:00
mlemanczyk 0cc9f6b84a Modulo benchmarks added. 2023-03-26 23:57:23 +02:00
mlemanczyk bd04f10931 Tiny cleanup 2023-03-26 23:40:13 +02:00
mlemanczyk 858964edbc MathUtils added 2023-03-26 23:38:21 +02:00
mlemanczyk ef285bdc67 Historical versions removed. 2023-03-26 23:37:26 +02:00
mlemanczyk 9aac3e0224 RecyclableList[int] & RecyclableList[long] performance improvements. We'll now require the block size to be the power of 2. Includes historical versions. 2023-03-26 23:35:08 +02:00
mlemanczyk c7052e778f RecyclableList.SetNewLength fixed to properly initialize the list if the no. of memory blocks from array pool exceeds requested no. 2023-03-26 23:22:32 +02:00
mlemanczyk f231f7e0aa RecyclableList.LastBlockIndex renamed to RecyclableList.NextItemBlockIndex. 2023-03-26 23:16:34 +02:00
mlemanczyk 17787b2cb1 Benchmark results moved to Recyclable.Collections.Benchmarks to keep the package clean. 2023-03-24 21:02:45 +01:00
mlemanczyk b815767d8f RecyclableArrayList & RecyclableList tests synced. 2023-03-24 20:53:54 +01:00
mlemanczyk 76598dcc7d Cleanup 2023-03-24 20:14:29 +01:00
mlemanczyk 00b059006d Compilation error fix. 2023-03-24 20:13:40 +01:00
mlemanczyk 98026f0103 No. of test cases reduced due to high execution times. 2023-03-24 20:10:49 +01:00
mlemanczyk a5a4129f1c Resolved problem with running tests all together. 2023-03-24 20:04:16 +01:00
mlemanczyk e4e63715c2 Added missing "using" 2023-03-24 19:06:01 +01:00
mlemanczyk 31e3099bf4 Removed unnecessary arguments. We'll try to get enumerated count later in AddRange anyway. 2023-03-24 19:04:34 +01:00
mlemanczyk ea52b32859 Fixed memory leak in RecyclableList.AddRangeEnumerated 2023-03-24 19:03:46 +01:00
mlemanczyk 6fc2a10e28 RecyclableArrayList fixes to always stay within the no. of items on the list, not the size of memory block. 2023-03-24 19:02:45 +01:00
mlemanczyk 97d5d9c6a3 RecyclableArrayList.Contains fixed to respect empty list. 2023-03-22 01:22:01 +01:00
mlemanczyk 5a39dc87f0 Tests ordered alphabetically. 2023-03-22 00:25:16 +01:00
mlemanczyk c84cf263ca Missing using added to limit pressure on garbage collector.
RecyclableArrayList.Remove tests extended to cover more cases.

Tiny cleanup.
2023-03-22 00:07:24 +01:00
mlemanczyk 62b2a2d105 Merge branch 'recyclable-block-list-added' of https://github.com/mlemanczyk/Recyclable.Collections into recyclable-block-list-added 2023-03-22 00:04:28 +01:00
mlemanczyk 0f7237e3f0 Added rented array clearing if T is a reference type, as discussed in https://github.com/dotnet/runtime/issues/25378. 2023-03-22 00:04:25 +01:00
mlemanczyk 4a1f2c1ffb Added rented array clearing if T is a reference type, as discussed in https://github.com/dotnet/runtime/issues/25378. 2023-03-22 00:00:41 +01:00
mlemanczyk d4af246a3a Added missing Array.IndexOf parameter 2023-03-21 23:14:34 +01:00
mlemanczyk cda1c2b77d Merge branch 'recyclable-block-list-added' of https://github.com/mlemanczyk/Recyclable.Collections into recyclable-block-list-added 2023-03-20 23:51:30 +01:00
mlemanczyk 277e52f701 RecyclableArrayList.Contains fixed to not throw exception when the list is empty.
RecyclableArrayList tests sorted alphabetically, simplified & extended to use the test data & validate various combinations of item counts & block sizes.
2023-03-20 23:51:23 +01:00
mlemanczyk b91c4476eb RecyclableList.BlockCount renamed => RecyclableList.ReservedBlockCount. Fixed to always include the last block.
RecyclableList.LastTakenBlockIndex property added for some scenarios.

RecyclableList.IndexOf & .LongIndexOf fixed to use the correct index.

RecyclableArrayList.AddRange(RecyclableList<T> items) fixed to use the correct index.

Some test cases excluded, where needed.
2023-03-20 23:46:50 +01:00
mlemanczyk 0a402e2d13 Merge branch 'recyclable-block-list-added' of https://github.com/mlemanczyk/Recyclable.Collections into recyclable-block-list-added 2023-03-20 21:49:49 +01:00
mlemanczyk b1e6c587c3 RecyclableList modified to respect the removal of blocks.
RecyclableList.IndexOf fixed to work in various combinations.

RecyclableList tests extended.
2023-03-20 21:48:09 +01:00
mlemanczyk b21b80e222 RecyclableList modified to respect the removal of blocks.
RecyclableList.IndexOf fixed to work in various combinations.

RecyclableList tests extended.
2023-03-20 20:29:50 +01:00
mlemanczyk 070549de9e Merge branch 'recyclable-block-list-added' of https://github.com/mlemanczyk/Recyclable.Collections into recyclable-block-list-added 2023-03-20 19:40:11 +01:00
mlemanczyk 1157e3e23d Test cases adjusted to limit execution time. 2023-03-20 19:32:08 +01:00
Marek Lemańczyk e6224ebe44 Fixed handling of empty lists in RecyclableArrayList.
Some RecyclableList properties made public to allow use in RecyclableArrayList.

Added support for RecyclableList in RecyclableArrayList.AddRange.

Additional tests added for RecyclableArrayList.
2023-03-19 20:37:18 +01:00
Marek Lemańczyk e312accfe5 Unused & confusing test data removed. 2023-03-17 02:09:16 +01:00
Marek Lemańczyk 3e8f03e59f RecyclableList tests extended & parameterized for various combinations of block sizes in source & target lists, including different no. of items. 2023-03-17 01:42:30 +01:00
Marek Lemańczyk 5235ea12bc RecyclableListExtensions.CopyTo fixed to not raise exceptions in some configurations. 2023-03-17 01:40:56 +01:00
Marek Lemańczyk cf284865e9 RecyclableList finalizer added to make sure that the recyclable arrays are correctly returned. 2023-03-16 02:24:18 +01:00
Marek Lemańczyk c2eefdfe3b RecyclableCollections.Contains(T item) fixes to exceptions found by tests. 2023-03-16 02:21:14 +01:00
Marek Lemańczyk ca6ee45bb6 RecyclableCollections.AddRange(List<T> items) fixes to exceptions found by tests. 2023-03-16 02:20:16 +01:00