Optimisation for String and XML parsing.