Skip to content

Commit bb8c49a

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

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ 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
72-
different crates or binaries (e.g. multiple test binaries that each test a
73-
substantial swath of the API).
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 mostly
72+
used, and/or used in multiple different crates or binaries (e.g. multiple test
73+
binaries that each test a substantial swath of the API).
7474

7575
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.
76+
it applies obvious and substantial wins for your users. Applying it across the
77+
board to all your dependencies will likely regress compilation time.
7878

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

0 commit comments

Comments
 (0)