Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7754

[C++] Result<T> is slow

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.17.0
    • C++

    Description

      When converting a short performance-critical function to return a Result (instead of returning a Status and filling a out-parameter), I noticed a catastrophic performance regression (around 2x or 3x slower).

      It seems the current Result implementation is very slow, for several reasons:

      • it imposes "safety" features even in release mode, for example on the critical path of move operators
      • the underlying mpark variant implementation is not optimized for performance-critical data structures

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              apitrou Antoine Pitrou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h