Currently parsing creates a lot of new strings as it goes. Might it be possible to avoid this by storing start/end positions instead? How would that affect memory usage and performance?