Skip to content

Optimise storage of empty Text #492

Description

@TeofilC

Right now there's many ways of creating empty Text values that are represented by distinct heap objects. This is a waste of memory and it would be good if the library guaranteed that they were all represented by Data.Text.empty.

My suggestion is that whenever we detect that we are creating a zero length Text value, let's use Data.Text.empty rather than create a new heap object.

I'd be happy to give implementing this a go

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions