Commit a55c2da
committed
Use IdentityHashMap for consistent JIT optimization in AbstractCompositeMeter
Replace Collections.emptyMap() with new IdentityHashMap<>() to maintain
consistent map implementation type throughout the object's lifecycle,
enabling JVM scalar replacement optimization and reducing iterator
allocation overhead.
Fixes gh-6811
Signed-off-by: David Mollitor <[email protected]>1 parent 65301f0 commit a55c2da
File tree
1 file changed
+7
-2
lines changed- micrometer-core/src/main/java/io/micrometer/core/instrument/composite
1 file changed
+7
-2
lines changedLines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
0 commit comments