ViggoC commented on issue #41: URL: https://github.com/apache/arrow-java/issues/41#issuecomment-2610485165
After change the setup level and call zeroVector in prepare (see 374357d2264ad917af9da1585442cf325ac25939), the `check and set` works for step 1 and 2. For step 10 and 40 cases, the performance decrease a lot because we run out of the pre allocated memory, setZero is required for the reallocated memory. ``` VariableWidthViewVectorInlineValueBenchmarks.setSafeFromArray 1 avgt 5 0.004 ± 0.001 ms/op VariableWidthViewVectorInlineValueBenchmarks.setSafeFromArray 2 avgt 5 0.004 ± 0.001 ms/op VariableWidthViewVectorInlineValueBenchmarks.setSafeFromArray 10 avgt 5 0.022 ± 0.004 ms/op VariableWidthViewVectorInlineValueBenchmarks.setSafeFromArray 40 avgt 5 0.032 ± 0.002 ms/op ``` Flame graph for step 1 / 2  Flame graph for step 10 / 40  -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
