Optimizing synchronization objects