Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3043

Change MapSize() to O(1)

    XMLWordPrintable

    Details

    • Type: Task
    • Status: To Do
    • Priority: (None)
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: libutils
    • Labels:

      Description

      Both HashMap and ArrayMap have an internal field that tells how many items they contain. So we can make MapSize() just return those values instead of iterating over the map and counting the elements inside it.

        Attachments

          Activity

            People

            Assignee:
            vpodzime Vratislav Podzimek
            Reporter:
            vpodzime Vratislav Podzimek
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: