Commit 58fced4
authored
Add missing inline annotations to Cell
Were seeing some odd performance problems when using incremental compilation where `Rc` pointers were actually slower than `Arc` pointers (the problem goes away when using non-incremental compilation). I haven't been able to build rustc locally to verify that this fixes it but these missing inline annotations seem to be the only thing that could affect performance (to this extent).
```
test vector_push_back ... bench: 11,668,015 ns/iter (+/- 772,861)
test vector_push_back_mut ... bench: 1,423,771 ns/iter (+/- 22,011)
test vector_push_back_mut_rc ... bench: 1,181,765 ns/iter (+/- 123,724)
test vector_push_back_rc ... bench: 17,141,746 ns/iter (+/- 203,048)
```
(Source and non incremental benchmarks orium/rpds#7 (comment))1 parent 3edb3cc commit 58fced4
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
| |||
449 | 450 | | |
450 | 451 | | |
451 | 452 | | |
| 453 | + | |
452 | 454 | | |
453 | 455 | | |
454 | 456 | | |
| |||
466 | 468 | | |
467 | 469 | | |
468 | 470 | | |
| 471 | + | |
469 | 472 | | |
470 | 473 | | |
471 | 474 | | |
| |||
486 | 489 | | |
487 | 490 | | |
488 | 491 | | |
| 492 | + | |
489 | 493 | | |
490 | 494 | | |
491 | 495 | | |
| |||
0 commit comments