3 ms·
Just for fun I made a benchmark for "two-star" and "one-star" versions of remove_if() and build() (to link an array of nodes). Code: http://ideone.com/D7bzmo ht
by ambrop7 14y ago
Just for fun I made a benchmark for "two-star" and "one-star" versions of remove_if() and build() (to link an array of nodes). Code: http://ideone.com/D7bzmo http://ideone.com/D7bzmo
Results with {gcc-4.7.2,clang-3.2} -march=corei7 -O3
build_onestar+remove_if_onestar: 0m0.309s 0m0.357s
build_onestar+remove_if_twostar: 0m0.302s 0m0.324s
build_twostar+remove_if_onestar: 0m0.310s 0m0.361s
build_twostar+remove_if_twostar: 0m0.302s 0m0.320s
The two-star version of remove_if() is a bit faster here, but both build() versions are the same, across both compilers.