tscrim / coxeter

Coxeter is a library for the study of combinatorial aspects of Coxeter group theory
11 stars 5 forks source link

Use std::copy over memcopy #12

Open tscrim opened 8 years ago

tscrim commented 8 years ago

I've seen some posts saying that the former is faster than the latter. Moreover, there are some places where handling the copying directly could be faster (e.g., List::erase).

jdemeyer commented 6 years ago

I assume that you mean memcpy (instead of memcopy). Really, with modern compilers, there should be no performance reason to prefer std::copy over memcpy. I would still argue that std::copy is better style, but I doubt you will gain performance.