From 36573e798c986e298c62daabed6036b12ea0314d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 2 Feb 2010 20:37:50 +0000 Subject: Use Glib string interning (quarks) to make Path/URI operator== very fast. This avoids a ton of string comparison overhead in Ingen when setting various properties (e.g. "ingen:value" was compared several times every time a port value was changed, now this is just a single pointer comparison and the full round trip of a value change does no string comparison at all, but is still property based and RDFey). git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2408 a436a847-0d15-0410-975c-d299462d15a1 --- raul/TableImpl.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'raul/TableImpl.hpp') diff --git a/raul/TableImpl.hpp b/raul/TableImpl.hpp index 0b32a29..6b91d01 100644 --- a/raul/TableImpl.hpp +++ b/raul/TableImpl.hpp @@ -264,7 +264,7 @@ Table::insert(const std::pair& entry) const K& key = entry.first; const T& value = entry.second; - if (size() == 0 || (size() == 1 && key > _entries[0].first)) { + if (size() == 0 || (size() == 1 && _entries[0].first < key)) { _entries.push_back(entry); return std::make_pair(iterator(*this, size()-1), true); } else if (size() == 1) { @@ -291,7 +291,7 @@ Table::insert(const std::pair& entry) if (elem.first == key) { elem.second = value; return std::make_pair(iterator(*this, i), false); - } else if (elem.first > key) { + } else if (key < elem.first) { if (i == 0 || _entries[i-1].first < key) break; upper = i - 1; -- cgit v1.2.1