Skip to content

Commit 77e6ad8

Browse files
Clarify guidance on when not to apply hint
Co-authored-by: Ben Kimock <[email protected]>
1 parent 00511d5 commit 77e6ad8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

content/inside-rust/call-for-testing-hint-mostly-unused.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,15 @@ of which 49% is codegen, to building in 7.5s of which 1% is codegen.
6767
Note that this option does not provide a universal performance improvement for
6868
every crate; if used when not applicable, this option can make builds much
6969
*slower*. Deferring compilation of the items in a crate can lead to redoing
70-
code generation for those items repeatedly. In particular, avoid using this
71-
hint for crates whose API surface is mostly used, and/or used in multiple
70+
code generation for those items repeatedly. In particular, this hint will
71+
probably regress compile time if applied to crates whose API surface is
72+
mostly used, and/or used in multiple
7273
different crates or binaries (e.g. multiple test binaries that each test a
7374
substantial swath of the API).
7475

7576
Always do performance analysis when considering this hint, and only apply it if
76-
it applies obvious and substantial wins for your users. Never apply it across
77-
the board to all your dependencies.
77+
it applies obvious and substantial wins for your users. Applying it across
78+
the board to all your dependencies will probably go poorly.
7879

7980
If most of the items in your crate are polymorphic (generic), this hint may be
8081
redundant, as Rust already defers compilation of polymorphic items until they

0 commit comments

Comments
 (0)