luizmlima commented on PR #16416:
URL: https://github.com/apache/lucene/pull/16416#issuecomment-5212138606

   ### Additional benchmark results
   
   I ran an additional JMH benchmark round to better evaluate the impact of 
replacing `ArrayList` with `ArrayDeque` in `JapaneseCompletionFilter`.
   
   The benchmark executes the full `JapaneseCompletionAnalyzer` pipeline and 
consumes all generated tokens. Both implementations were tested using the same 
benchmark source, inputs, JVM configuration, hardware, and JMH settings.
   
   **Execution time**
   
   | Input | ArrayList | ArrayDeque | Difference |
   | --- | ---: | ---: | ---: |
   | `東京` | 1.473 µs/op | 1.364 µs/op | **-7.40%** |
   | `ドラえもん` | 2.923 µs/op | 2.706 µs/op | **-7.40%** |
   | `シンシンシン` | 5.486 µs/op | 4.968 µs/op | **-9.43%** |
   | `シンシンシンシンシン` | 9.294 µs/op | 8.255 µs/op | **-11.18%** |
   
   The `ArrayDeque` implementation had a lower mean execution time for all 
tested inputs. The improvement became more visible for the larger synthetic 
inputs, which is consistent with avoiding repeated `ArrayList.remove(0)` 
operations.
   
   I also ran the benchmark with the JMH GC profiler and analyzed 
`gc.alloc.rate.norm` (`B/op`). Allocation was effectively unchanged for most 
inputs.
   
   Overall, the additional measurements suggest that the main benefit of the 
change is lower execution time without evidence of a meaningful allocation 
regression, and better matches the FIFO access pattern. 
   
   The full experiment report, including methodology, results, discussion, and 
limitations, is available here:
   
   **[Full experiment 
report](https://docs.google.com/document/d/1rhBTifI0_QzEuobxPoHsNeWx98bcKZ3TgaQxcnKfAZM)**


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to