add a benchmark for encoding