I think (specialized) JITting is the answer for that. Generate code on the fly. I've been lately playing around with JITted [de]serializers, etc. I think it might be possible to have an order of magnitude gains in JSON, XML, msgpack, etc. processing.
Even *printf can be much, much faster. If the format specifier is static, first run just generates code just for that specifier. Subsequent invocations can be about 10-20x faster versus normal style format string scanner.
Edit: When I say JIT, I'm not talking about JVM or any other mainstream implementation specifically, but the concept in general. Which means just-in-time generation of (optimal) machine specific code.