Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-1137

[C++] Improve float/double conversion in DoubleColumnReader::next()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.0
    • 1.8.0
    • C++
    • None

    Description

      DoubleColumnReader::next() takes a portion of time when reading doubles from a tpch-lineitem ORC file.

      I can see the loop in readDouble is unrolled. But it still have redundant checks. We can manually unroll it to save some instructions.

      Furthermode, in little-endian machines, the layout of the DATA stream of the DOUBLE column matches the memory layout of the output array. We can use std::memcpy to copy the data directly.

      Attachments

        1. DoubleColumnReader.png
          163 kB
          Quanlong Huang
        2. DoubleColumnReader_readDouble.png
          411 kB
          Quanlong Huang

        Issue Links

          Activity

            People

              stigahuang Quanlong Huang
              stigahuang Quanlong Huang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: