Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2882

Use Deque instead of Stack

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.10.0
    • 0.11
    • impl
    • Patch Available

    Description

      There are places where java.util.Stack is used.

      Replace it with java.util.Deque because it java.util.Stack is a legacy class and extends java.util.Vector which is synchronized and slow.

      Quote from the java.util.Deque javadoc:

      >Deques can also be used as LIFO (Last-In-First-Out) stacks. This interface should be used in preference to the legacy Stack class.

      Attachments

        1. Deque.patch
          15 kB
          Mairbek Khadikov

        Activity

          People

            mkhadikov Mairbek Khadikov
            mkhadikov Mairbek Khadikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: