<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_expand/src/stats.rs, branch try-perf</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try-perf</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try-perf'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-08-09T07:47:01+00:00</updated>
<entry>
<title>remove `P`</title>
<updated>2025-08-09T07:47:01+00:00</updated>
<author>
<name>Deadbeef</name>
<email>ent3rm4n@gmail.com</email>
</author>
<published>2025-08-09T05:24:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ad1113f87ef828b300ebb8fca397efd358580da3'/>
<id>urn:sha1:ad1113f87ef828b300ebb8fca397efd358580da3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Tweak `-Zmacro-stats` measurement.</title>
<updated>2025-06-23T22:42:14+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-06-23T22:42:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c3200c3bb54b94bafb0731adeffd2128f1d6cdd3'/>
<id>urn:sha1:c3200c3bb54b94bafb0731adeffd2128f1d6cdd3</id>
<content type='text'>
It currently reports net size, i.e. size(output) - size(input). After
some use I think this is sub-optimal, and it's better to just report
size(output). Because for derive macros the input size is always 1, and
for attribute macros it's almost always 1.
</content>
</entry>
<entry>
<title>Introduce `-Zmacro-stats`.</title>
<updated>2025-06-12T11:17:17+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2025-06-02T09:39:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=376cbc3787d2312b6b3b5db84dd1734fed1ebda6'/>
<id>urn:sha1:376cbc3787d2312b6b3b5db84dd1734fed1ebda6</id>
<content type='text'>
It collects data about macro expansions and prints them in a table after
expansion finishes. It's very useful for detecting macro bloat,
especially for proc macros.

Details:
- It measures code snippets by pretty-printing them and then measuring
  lines and bytes. This required a bunch of additional pretty-printing
  plumbing, in `rustc_ast_pretty` and `rustc_expand`.
- The measurement is done in `MacroExpander::expand_invoc`.
- The measurements are stored in `ExtCtxt::macro_stats`.
</content>
</entry>
</feed>
