Add benchmarks for encoding too, while we're at it