# Identical method redefinition suspiciously optimizes runtime and allocations

**URL:** <https://discourse.julialang.org/t/identical-method-redefinition-suspiciously-optimizes-runtime-and-allocations/132156>\
**Category:** Performance\
**Tags:** memory-allocation, benchmarktools, allocations\
**Created:** [September 7, 2025, 11:42am UTC](https://discourse.julialang.org/t/identical-method-redefinition-suspiciously-optimizes-runtime-and-allocations/132156 "2025-09-07T11:42:14Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)\
**Post date:** [September 11, 2025, 2:49pm UTC](https://discourse.julialang.org/t/identical-method-redefinition-suspiciously-optimizes-runtime-and-allocations/132156/17 "2025-09-11T14:49:01Z")

</div>

> [@Benny](#):
>
> The examples in #35800 also appeared to stop reproducing after v1.8

Interesting, I didn’t realize that. But this kind of stateful behavior is still encountered from time to time, see for example [Type instability in nested quadgk calls](https://discourse.julialang.org/t/type-instability-in-nested-quadgk-calls/126667)

---

_[View the full topic](https://discourse.julialang.org/t/identical-method-redefinition-suspiciously-optimizes-runtime-and-allocations/132156)._
