expand optimizations and added timing logging output