Skip to content
  • Robert Maynard's avatar
    Refactor GetRange to compute all ranges at the same time. · 196bbe8a
    Robert Maynard authored
    Instead of only computing a single components range when requested, we
    now compute all the component ranges and cache all the values. This
    improves the total runtime by 1.5x to 3x.
    
    Computing the range for a multiple component array of type: float with a length of 10000000 and with 3 components
    original: 0.028544 seconds
    new:      0.018013 seconds
    Computing the range for a multiple component array of type: double with a length of 10000000 and with 3 components
    original: 0.042368 seconds
    new:      0.019447 seconds
    Computing the range for a multiple component array of type: int with a length of 10000000 and with 3 components
    original: 0.03528 seconds
    new:      0.023454 seconds
    Computing the range for a multiple component array of type: vtkIdType with a length of 10000000 and with 3 components
    original: 0.050991 seconds
    new:      0.024635 seconds
    Computing the range for a multiple component array of type: float with a length of 10000000 and with 9 components
    original: 0.186394 seconds
    new:      0.112901 seconds
    Computing the range for a multiple component array of type: double with a length of 10000000 and with 9 components
    original: 0.375575 seconds
    new:      0.114103 seconds
    Computing the range for a multiple component array of type: int with a length of 10000000 and with 9 components
    original: 0.200056 seconds
    new:      0.141547 seconds
    Computing the range for a multiple component array of type: vtkIdType with a length of 10000000 and with 9 components
    original: 0.369794 seconds
    new:      0.144766 seconds
    
    Change-Id: Ia3da45b323d2d9daf0b0c428140cc5faef6db185
    196bbe8a