This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
This is about <functional>'s internal helpers _Index_tuple and _Build_index_tuple.
I noticed that _Build_index_tuple is very complex and does not reuse instantiations with lower numbers. To test, I instantiated it with _Num = { 400, 401, 402, ..., 419 }, which took 6.5s to compile on my machine. The improved version, which does reuse the instantiation of _Build_index_tuple/_Index_tuple for _Num=418 for _Num=419, etc. compiles in 0.3s - approx. 20x faster.
Of course the above test is an extreme case, but it's IMHO also easier to understand the new code. What do you think, worth it?
BTW: A shame that these little helpers are not part of the upcoming standard...
Regards,
Daniel
Attachment:
Index_tuple.patch
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |