#include <bits/stdc++.h>
using namespace std;
using namespace chrono;

constexpr int SIZE = 100000;
constexpr int TIMES = 10000;

struct Type {
	int r, g, b;
};

int main() {
	vector<Type> v1( SIZE );
	vector<Type> v2( v1 );
	
	for( int i = TIMES; i--; ) {
		copy( v1.begin(), v1.end(), v2.begin() );
	}
	
	auto t2 = steady_clock::now();
	for( int i = TIMES; i--; ) {
		copy( v1.begin(), v1.end(), v2.begin() );
	}
	cout << "std::copy: ";
	cout << duration_cast<milliseconds>( steady_clock::now() - t2 ).count() << endl;
	
	auto t1 = steady_clock::now();
	for( int i = TIMES; i--; ) {
		memcpy( v2.data(), v1.data(), v1.size() * sizeof( Type ) );
	}
	cout << "memcpy: ";
	cout << duration_cast<milliseconds>( steady_clock::now() - t1 ).count() << endl;
}