
#include <iostream>
#include <vector>
#include <string>
#include <chrono>
using namespace std;


class MyObject {
public:
	MyObject(string Str) : m_Str(Str) { }
	
	string m_Str;
};

int main() {
	chrono::time_point<chrono::system_clock> tstart, tend;
	chrono::duration<double> tt;
	





	tstart = chrono::system_clock::now();

	vector<MyObject> VectorOfObjects;
	for (int i=0; i<10000; i++) {
		MyObject x("test");
		VectorOfObjects.push_back(x);
	}

	tend = chrono::system_clock::now();
	tt = tend-tstart;
	cout << "Pushback Object: " << tt.count()*1000 << " Milliseconds\n" << endl;
	
	





	tstart = chrono::system_clock::now();

	vector<MyObject *> VectorOfPointers;
	for (int i=0; i<10000; i++) {
		VectorOfPointers.push_back(new MyObject("test"));
	}

	tend = chrono::system_clock::now();
	tt = tend-tstart;
	cout << "Pushback Pointers: " << tt.count()*1000 << " Milliseconds\n" << endl;



	return 0;
}


