LiteralToString: avoid constructing temporary stringstreams. This is a massive performance improvement (x10-x100)