Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove includes of quite large files if they are not needed to descrease compilation time and some obsolete code from memory.h #871

Open
dsuponitskiy opened this issue Sep 17, 2024 · 0 comments · May be fixed by #898
Assignees
Labels
cleanup Code cleanup
Milestone

Comments

@dsuponitskiy
Copy link
Collaborator

dsuponitskiy commented Sep 17, 2024

The large file which inclusions are to be reviewed: <iostream>, <vector>, <string> and, possibly, <algorithm>.
Examples:
<iostream> is included in core/include/math/hal/intnat/ubintnat.h, core/include/lattice/hal/default/poly-impl.h, etc. it potentially slows down the compilation.

Forward declarations of I/O stream types from <iostream>, then include <iosfwd>.

Forward declaration for std::vector:
namespace std {
template <typename T> class vector;
}
or
#include // std::allocator
namespace std {
template <typename T, typename Allocator = std::allocator<T>> class vector;
}

@dsuponitskiy dsuponitskiy added the cleanup Code cleanup label Sep 17, 2024
@dsuponitskiy dsuponitskiy added this to the Release 1.2.2 milestone Sep 17, 2024
@dsuponitskiy dsuponitskiy self-assigned this Sep 17, 2024
@dsuponitskiy dsuponitskiy changed the title Remove includes of quite large files if they are not needed to descrease compilation time Remove includes of quite large files if they are not needed to descrease compilation time and some obsolete code from memory.h Oct 30, 2024
@dsuponitskiy dsuponitskiy linked a pull request Oct 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code cleanup
Projects
None yet
2 participants