[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-28 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-700028726 Thanks everyone for all the comments and suggestions! This is an automated message from the Apache Git Service.

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-25 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-698085225 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-25 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-698863342 @liyafan82 thanks for the detailed review! This is an automated message from the Apache Git Service. To respond

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-23 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-698085225 I've updated the PR to cache the capacities, and recompute it whenever it is changed; please take a look again. Here are the benchmarks that seemed to have shown some chan

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-22 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-696381588 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-21 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-696065926 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-21 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-696466268 > I'm clearly missing something. Why doesn't item 2 when directly in the vector solve the same purpose as 1/3? Sorry, I didn't realize that the ArrowBuf was that restricte

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-21 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-696456877 *Option 2 being the best case of the append-only builder style interface; something like IntWriter, where direct access to the buffer was not permissible, and so its safe to do

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-21 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-696455205 Sorry, did you mean the specialized append interface (as Option 2), that assumes buffer ownership? I mislabeled the options in the paragraph you quoted (now corrected). I

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-21 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-696452697 @lidavidm @liyafan82 @jacques-n Interpreting the results: This patch could be improved (performance wise) by more aggressive caching (option 3), at the potential expense o

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-21 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-696450195 Here are the results of my testing. I'm not really that familiar with Arrow, and some of the code is sloppy, so please check that what I'm doing matches up with your expectation

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-21 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-696381588 @jacques-n I haven't done very much investigation on other speedups - I just happened to notice performance irregularities as compared to our other (legacy) codepaths, and reali

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-21 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-696065926 Yep, I'm worried that the buffers can be changed unintentionally/intentionally, and as you pointed out, needs to be always checked for and trapped. I'm wondering if the o

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-18 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-695122375 > I am thinking about another way: can we simply save the value/validity buffer capacities? so we can further improve the performance by avoiding the if branch in getValueBuffer

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-18 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-695114615 @liyafan82 Thanks for taking a look! > I am a little surprised that JIT failed to transform the integer divistion to a right shift, as it can be easily deduced that the ty

[GitHub] [arrow] josiahyan commented on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

2020-09-17 Thread GitBox
josiahyan commented on pull request #8214: URL: https://github.com/apache/arrow/pull/8214#issuecomment-694578807 @lidavidm This is an automated message from the Apache Git Service. To respond to the message, please log on to