Skip to content

stdlib/json.rs is written in a very inefficient style #1369

Description

@marijnh

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions