Exemplo n.º 1
0
void benchmark_VectorMap(const Vector<T>& key, const Vector<T>& fkey, int count)
{
	StopTime();
	cout << count << " items\n";
	{
		int i;
		VectorMap<T, int> map;
		StopTime();
		for(i = 0; i < count; i++)
			map.Add(key[i], i);
		cout << "Adding done in " << StopTime() << " s\n";
		for(int j = 0; j < 2; j++) {
			for(i = 0; i < count; i++)
				if(map.Get(fkey[i]) != i) {
					cout << "ERROR !\n";
					abort();
				}
			cout << "Search done in " << StopTime() << " s\n";
		}
		for(i = 0; i < count; i++)
			map.UnlinkKey(key[i]);
		cout << "Unlinking done in " << StopTime() << " s\n";
		for(i = 0; i < count; i++)
			map.Put(key[i], i);
		cout << "Putting done in " << StopTime() << " s\n";
	}
}
Exemplo n.º 2
0
void InvalidateFileTimeCache(const String& path)
{
	LLOG("InvalidateFileTimeCache " << path);
	sPathFileTime.UnlinkKey(path);
}