#94 performance optimizations