• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • core-libs

      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.

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

              Created:
              Updated:
              Resolved: