-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or requestfeatureThis label is in use for minor version incrementsThis label is in use for minor version increments
Milestone
Description
1.1 Object Pooling for High-Frequency Operators
// Recommendation: Implement object pooling for frequently allocated types
public class OperatorObjectPool<T>
{
private readonly ConcurrentBag<T> _pool = new();
private readonly Func<T> _objectFactory;
public OperatorObjectPool(Func<T> objectFactory) => _objectFactory = objectFactory;
public T Get() => _pool.TryTake(out T item) ? item : _objectFactory();
public void Return(T item) => _pool.Add(item);
}
// Apply to operators like Filter, Map that process high volumes1.2 Reduce Boxing/Unboxing in Operator Chains
// Current issue: IOperator.Process(object input) causes boxing
public interface IOperator<TInput, TOutput>
{
void Process(TInput input);
void SetNext(IOperator<TOutput, TNext> nextOperator);
}
// Benefits: Eliminates boxing overhead, improves type safetyMetadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfeatureThis label is in use for minor version incrementsThis label is in use for minor version increments