Store the strings, as the TODO said. This memoization saves 9/10 of running time: BenchmarkSql-4 (before) 300000 5429 ns/op BenchmarkSql-4 (after) 3000000 430 ns/op Change-Id: I4edabff96043620b5af3f5b507ddd75d65b22ff1