On Thu, 15 May 2025 21:04:40 GMT, Archie Cobbs wrote:
>> Please review this small performance tweak `ArrayDeque`.
>>
>> `ArrayDeque` has an invariant in which any unused elements in the array must
>> be null. In a couple of places, the code is setting contiguous ranges of
>> elements to null u
On Thu, 15 May 2025 18:33:22 GMT, Raffaello Giulietti
wrote:
> Here are many
> [exmaples](https://github.com/openjdk/jmh/tree/master/jmh-samples/src/main/java/org/openjdk/jmh/samples)
> on how to correctly use JMH.
>
> A
> [blackhole](https://github.com/openjdk/jmh/blob/master/jmh-samples/sr
> Please review this small performance tweak `ArrayDeque`.
>
> `ArrayDeque` has an invariant in which any unused elements in the array must
> be null. In a couple of places, the code is setting contiguous ranges of
> elements to null using `for()` loops. This can be both simplified and sped up
On Thu, 15 May 2025 19:53:03 GMT, ExE Boss wrote:
> Note that `Arrays.fill(…)` is simply a `for(…)` loop with an additional range
> check
Interesting... I was assuming that most of the "bulk" methods in `Arrays` were
being hand-optimized with special hardware magic (e.g., vector instructions),
On Thu, 15 May 2025 17:46:39 GMT, Archie Cobbs wrote:
>> Please review this small performance tweak `ArrayDeque`.
>>
>> `ArrayDeque` has an invariant in which any unused elements in the array must
>> be null. In a couple of places, the code is setting contiguous ranges of
>> elements to null u
On Thu, 15 May 2025 17:56:10 GMT, Archie Cobbs wrote:
>> test/jdk/java/util/ArrayDeque/ClearBenchmarkTestJMH.java line 64:
>>
>>> 62: @Measurement(iterations = 10)
>>> 63: @Warmup(iterations = 3)
>>> 64: public void fillAndClear() {
>>
>> I think you need to return the collection or
On Thu, 15 May 2025 17:50:30 GMT, Rémi Forax wrote:
> I think you need to return the collection or send it to a BlackHole
I'm fairly new to the benchmark game so I would not be surprised if this is
broken.
Previously I was adding them to a list but that caused OOMs.
Can you clarify what you m
On Thu, 15 May 2025 17:46:39 GMT, Archie Cobbs wrote:
>> Please review this small performance tweak `ArrayDeque`.
>>
>> `ArrayDeque` has an invariant in which any unused elements in the array must
>> be null. In a couple of places, the code is setting contiguous ranges of
>> elements to null u
On Wed, 14 May 2025 19:37:37 GMT, Archie Cobbs wrote:
> Please review this small performance tweak `ArrayDeque`.
>
> `ArrayDeque` has an invariant in which any unused elements in the array must
> be null. In a couple of places, the code is setting contiguous ranges of
> elements to null using
> Please review this small performance tweak `ArrayDeque`.
>
> `ArrayDeque` has an invariant in which any unused elements in the array must
> be null. In a couple of places, the code is setting contiguous ranges of
> elements to null using `for()` loops. This can be both simplified and sped up
On Wed, 14 May 2025 19:37:37 GMT, Archie Cobbs wrote:
> Please review this small performance tweak `ArrayDeque`.
>
> `ArrayDeque` has an invariant in which any unused elements in the array must
> be null. In a couple of places, the code is setting contiguous ranges of
> elements to null using
On Thu, 15 May 2025 06:07:06 GMT, Alan Bateman wrote:
> Are you planning to add some JMH benchmarks to go with this?
I wasn't planning to, but I'm inferring from your question that you'd prefer to
see one.
Which also makes me curious. I'd be shocked if this were slower, but even if
not, I won
On Wed, 14 May 2025 19:37:37 GMT, Archie Cobbs wrote:
> Please review this small performance tweak `ArrayDeque`.
>
> `ArrayDeque` has an invariant in which any unused elements in the array must
> be null. In a couple of places, the code is setting contiguous ranges of
> elements to null using
Please review this small performance tweak `ArrayDeque`.
`ArrayDeque` has an invariant in which any unused elements in the array must be
null. In a couple of places, the code is setting contiguous ranges of elements
to null using `for()` loops. This can be both simplified and sped up by using
`
14 matches
Mail list logo