Nikita Kniazev
|
e59afeab79
|
<iterator>: reduced parsing time (#355)
* Replaced `<istream>` include with `<iosfwd>` because `[io]stream_iterator`
needs only `basic_[io]stream` forward declaration.
* Moved `[io]streambuf_iterator` iterator definition to `<iterator>` because
their definition has to come when `<iterator>` is included.
* Include `<iterator>` in `<xlocmon>`, `<xlocnum>`, and `<xloctime>` as
the `[io]streambuf_iterator` definition are required there, and `<xutility>`
already included via other includes.
Parsing times:
| header | clang | msvc |
|------------|-------------------------|-------------------------|
| <iterator> | 0.371 -> 0.163 (-56.1%) | 0.216 -> 0.094 (-56.5%) |
| <istream> | 0.366 -> 0.372 ( +1.6%) | 0.215 -> 0.216 ( +0.5%) |
| <xlocmon> | 0.358 -> 0.364 ( +1.7%) | 0.211 -> 0.211 ( 0%) |
| <xlocnum> | 0.357 -> 0.360 ( +0.8%) | 0.207 -> 0.208 ( +0.5%) |
| <xloctime> | 0.364 -> 0.370 ( +1.6%) | 0.211 -> 0.214 ( +1.4%) |
|
2019-12-16 17:04:28 -08:00 |