This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Split ranges.transform.binary.pass.cpp up
ClosedPublic

Authored by philnik on Jan 19 2023, 11:15 PM.

Details

Summary

ranges.transform.binary.pass.cpp took ~25s to compile. ranges.transform.binary.range.pass.cpp and ranges.transform.binary.iterator.pass.cpp take ~13s each.

Diff Detail

Event Timeline

philnik created this revision.Jan 19 2023, 11:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2023, 11:15 PM
philnik requested review of this revision.Jan 19 2023, 11:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2023, 11:15 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript

Another way of splitting the test is that you can put test_iterators (both iterators and ranges overload) in a header and having few test files instantiating it for different types of iterators. This way you can avoid duplicating the test points and it is easier to further splitting them up if two is not enough

Thanks for working on this!
On AIX 64 both tests now take about the same time.
555.11s: ibm-libc++-shared.cfg.in :: std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp
530.22s: ibm-libc++-shared.cfg.in :: std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp

libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp
21

Please add a remark The ranges part is tested in ranges.transform.binary.ranges.pass.cpp, and a similar in the other file.

ldionne accepted this revision.Feb 1 2023, 8:52 AM

LGTM, the test duplication is IMO not that bad. As Nikolas says, it could also be reduced further with meta::for_each.

This revision is now accepted and ready to land.Feb 1 2023, 8:52 AM
This revision was landed with ongoing or failed builds.Feb 1 2023, 10:56 AM
This revision was automatically updated to reflect the committed changes.
philnik marked an inline comment as done.
libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp