Optimize enqueue/dequeue calls