Description
Looking at a workload that is CPU-bound in compaction, the top CPU consumer is kudu::GetKeyEncoder<kudu::faststring>(kudu::TypeInfo const*). This is called for every cell that is part of the compound key, and is quite expensive since it involves a 'div' instruction.
A very easy win would be to pre-cache the key encoder objects for each of the columns in the schema. A less-easy but probably bigger win would be to codegen the comparable key encoder for the schema.