3700 FPS here we go

This commit is contained in:
Dynamitos
2021-04-25 23:43:40 +02:00
parent 312ae2af9a
commit 4a078bd24c
35 changed files with 160 additions and 73 deletions
+2 -2
View File
@@ -280,11 +280,11 @@ public:
}
inline V &operator[](K&& key)
{
root = splay(root, std::forward<K>(key));
root = splay(root, std::move(key));
markIteratorDirty();
if (root == nullptr || root->pair.key < key || key < root->pair.key)
{
root = insert(root, std::forward<K>(key));
root = insert(root, std::move(key));
_size++;
}
return root->pair.value;