SERIOUSLY? You generating new string every time using CONCATENATION? Not even using StringBuilder? Not saying about optimization and using char[]. No wonder then that you get a load of garbage collection and losing performance. That's cheating benchmark.