Skip to content

Commit

Permalink
PhpHashtable - don't use pooling, does not have much effect and uses …
Browse files Browse the repository at this point in the history
…more mem.
  • Loading branch information
jakubmisek committed Feb 20, 2025
1 parent 760d744 commit 5bfaee2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Peachpie.Runtime/OrderedDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ public sealed class OrderedDictionary/*<TValue>*/ : IEnumerable<KeyValuePair<Int

static class BucketPool
{
public static Bucket[] RentData(uint size) => ArrayPool<Bucket>.Shared.Rent(unchecked((int)size));
public static Bucket[] RentData(uint size) => new Bucket[size]; // ArrayPool<Bucket>.Shared.Rent(unchecked((int)size));

public static int[] RentHash(uint size) => ArrayPool<int>.Shared.Rent(unchecked((int)size));

public static void Return(Bucket[] array) => ArrayPool<Bucket>.Shared.Return(array, clearArray: true);
public static void Return(Bucket[] array) { } // ArrayPool<Bucket>.Shared.Return(array, clearArray: true);

public static void Return(int[] array)
{
Expand Down

0 comments on commit 5bfaee2

Please sign in to comment.