Skip to content

Add a constructor with size parameter on JSONArray and JSONObject classes #80

@SuperPat45

Description

@SuperPat45

JSONArray is initialized with an initial size of 10, but if I know in advance that I have hundreds of elements, a new constructor with an initial size can avoid lots of arraycopy under the hood.
Conversely, if I know I have less than 10 items, it could save memory.

Idem for JSONObject

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions