various optimalisations for speed

Most are kind of micro optimizations but when sending a lot of metrics (15 metrics @ 9000/s) to bucky these can help :)