Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:

      Description

      Instead of creating multiple instances of List0, Set0, and Map0, they should be singletons. This would save space in the cases where a lot of them are used.

      On the other hand, there may be a code size advantage sharing a single field-based implementation for small collections, say with 0, 1, or 2 elements.

      Sharing a singleton seems to make sense, but sometimes creating apparently redundant copies improves locality. The tradeoff isn't obvious.

        Attachments

          Activity

            People

            • Assignee:
              smarks Stuart Marks
              Reporter:
              smarks Stuart Marks
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: