Commit a0f5c74
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 a0f5c74
File tree
1 file changed
+8
-5
lines changed- micrometer-core/src/main/java/io/micrometer/core/instrument/composite
1 file changed
+8
-5
lines changedLines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | | - | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
98 | | - | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
0 commit comments