graydon/rust — Issue #1369: stdlib/json.rs is written in a very inefficient style
Author: marijnh
Created: 2011-12-22 08:25:10+00:00
State: open

It takes a very Haskell approach to parsing, cutting off piece by piece of the parsed string, and thus constantly allocating new strings. The functional style can be preserved by passing around a (@str, uint) pair with the offset as well as the string. But it'd probably be better to make it act on a stream abstraction (as in our io module), so that you can parse directly from files and sockets as well.