os-rust/library/proc_macro
Nika Layzell 4d45af9e73 Try to reduce codegen complexity of TokenStream's FromIterator and Extend impls
This is an experimental patch to try to reduce the codegen complexity of
TokenStream's FromIterator and Extend implementations for downstream
crates, by moving the core logic into a helper type. This might help
improve build performance of crates which depend on proc_macro as
iterators are used less, and the compiler may take less time to do
things like attempt specializations or other iterator optimizations.

The change intentionally sacrifices some optimization opportunities,
such as using the specializations for collecting iterators derived from
Vec::into_iter() into Vec.

This is one of the simpler potential approaches to reducing the amount
of code generated in crates depending on proc_macro, so it seems worth
trying before other more-involved changes.
2022-06-17 00:42:26 -04:00
..
src Try to reduce codegen complexity of TokenStream's FromIterator and Extend impls 2022-06-17 00:42:26 -04:00
Cargo.toml proc_macro: Add a workaround for rustdoc 2022-04-19 22:49:27 +03:00