small pyll speed optimizations