Commit 400af25
Make
This may eliminate the reason for [an `Unsafe`-based implementation](#6806) even under Java 8, but we will ideally confirm that with benchmarks before ripping that implementation out. (There's also Android: `AtomicReferenceFieldUpdater` is available there, but we should look into performance, including under older versions, especially with AFAIK no plans to remove `Unsafe` there.)
(Also, make a few other tiny edits to the backport copy so that it matches the mainline copy more closely.)
RELNOTES=n/a
PiperOrigin-RevId: 713006636AtomicReferenceFieldUpdater fields static for [better performance](https://shipilev.net/blog/2015/faster-atomic-fu/#:~:text=thrown%20out%20of%20the%20window).1 parent 12bf71e commit 400af25
File tree
4 files changed
+77
-63
lines changed- android
- guava-tests/test/com/google/common/util/concurrent
- guava/src/com/google/common/util/concurrent
- guava-tests/test/com/google/common/util/concurrent
- guava/src/com/google/common/util/concurrent
4 files changed
+77
-63
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
| |||
Lines changed: 33 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 162 | + | |
166 | 163 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 164 | + | |
174 | 165 | | |
175 | 166 | | |
176 | 167 | | |
177 | 168 | | |
178 | | - | |
179 | | - | |
| 169 | + | |
| 170 | + | |
180 | 171 | | |
181 | 172 | | |
182 | 173 | | |
| |||
716 | 707 | | |
717 | 708 | | |
718 | 709 | | |
719 | | - | |
| 710 | + | |
720 | 711 | | |
721 | 712 | | |
722 | 713 | | |
| |||
1447 | 1438 | | |
1448 | 1439 | | |
1449 | 1440 | | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
1468 | 1451 | | |
1469 | 1452 | | |
1470 | 1453 | | |
| |||
1502 | 1485 | | |
1503 | 1486 | | |
1504 | 1487 | | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1505 | 1506 | | |
1506 | 1507 | | |
1507 | 1508 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
| |||
Lines changed: 30 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 189 | + | |
193 | 190 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 191 | + | |
201 | 192 | | |
202 | 193 | | |
203 | 194 | | |
| |||
1559 | 1550 | | |
1560 | 1551 | | |
1561 | 1552 | | |
1562 | | - | |
1563 | | - | |
1564 | | - | |
1565 | | - | |
1566 | | - | |
1567 | | - | |
1568 | | - | |
1569 | | - | |
1570 | | - | |
1571 | | - | |
1572 | | - | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
1577 | | - | |
1578 | | - | |
1579 | | - | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
1580 | 1563 | | |
1581 | 1564 | | |
1582 | 1565 | | |
| |||
1614 | 1597 | | |
1615 | 1598 | | |
1616 | 1599 | | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
1617 | 1618 | | |
1618 | 1619 | | |
1619 | 1620 | | |
| |||
0 commit comments