Commit 37498a1
committed
Use
UnsafeCell is the standard building block for shared mutable data
structures. UnsafeCell should add zero overhead compared to using raw
pointers directly.
Some reports suggest that debug builds, or even builds at opt-level 1,
may not always be inlining its methods. Mark the methods as
`#[inline(always)]`, since once inlined the methods should result in no
actual code other than field accesses.#[inline(always)] on trivial UnsafeCell methods1 parent 5b0ab79 commit 37498a1
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1815 | 1815 | | |
1816 | 1816 | | |
1817 | 1817 | | |
1818 | | - | |
| 1818 | + | |
1819 | 1819 | | |
1820 | 1820 | | |
1821 | 1821 | | |
| |||
1831 | 1831 | | |
1832 | 1832 | | |
1833 | 1833 | | |
1834 | | - | |
| 1834 | + | |
1835 | 1835 | | |
1836 | 1836 | | |
1837 | 1837 | | |
| |||
1856 | 1856 | | |
1857 | 1857 | | |
1858 | 1858 | | |
1859 | | - | |
| 1859 | + | |
1860 | 1860 | | |
1861 | 1861 | | |
1862 | 1862 | | |
| |||
1881 | 1881 | | |
1882 | 1882 | | |
1883 | 1883 | | |
1884 | | - | |
| 1884 | + | |
1885 | 1885 | | |
1886 | 1886 | | |
1887 | 1887 | | |
| |||
1914 | 1914 | | |
1915 | 1915 | | |
1916 | 1916 | | |
1917 | | - | |
| 1917 | + | |
1918 | 1918 | | |
1919 | 1919 | | |
1920 | 1920 | | |
| |||
0 commit comments