From 80d65b38008d9b7f31c825508819f9600d63b63c Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 16 Jun 2009 21:21:09 +0000 Subject: Performance improvements in AggregateOutput and SemanticState. Replaced AggregateOutput hierarchy with a flat list per connection holding only the OutputTasks that are potentially active. Tasks are droped from the list as soon as they return false, and added back when they may have output. Inlined frequently-used SequenceNumber functions. Replace std::list in QueueListeners with std::vector. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@785408 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/SequenceNumber.cpp | 60 --------------------------------- 1 file changed, 60 deletions(-) (limited to 'cpp/src/qpid/framing/SequenceNumber.cpp') diff --git a/cpp/src/qpid/framing/SequenceNumber.cpp b/cpp/src/qpid/framing/SequenceNumber.cpp index cac4e6681e..e61e3f2edf 100644 --- a/cpp/src/qpid/framing/SequenceNumber.cpp +++ b/cpp/src/qpid/framing/SequenceNumber.cpp @@ -26,60 +26,6 @@ using qpid::framing::SequenceNumber; using qpid::framing::Buffer; -SequenceNumber::SequenceNumber() : value(0) {} - -SequenceNumber::SequenceNumber(uint32_t v) : value((int32_t) v) {} - -bool SequenceNumber::operator==(const SequenceNumber& other) const -{ - return value == other.value; -} - -bool SequenceNumber::operator!=(const SequenceNumber& other) const -{ - return !(value == other.value); -} - - -SequenceNumber& SequenceNumber::operator++() -{ - value = value + 1; - return *this; -} - -const SequenceNumber SequenceNumber::operator++(int) -{ - SequenceNumber old(value); - value = value + 1; - return old; -} - -SequenceNumber& SequenceNumber::operator--() -{ - value = value - 1; - return *this; -} - -bool SequenceNumber::operator<(const SequenceNumber& other) const -{ - return (value - other.value) < 0; -} - -bool SequenceNumber::operator>(const SequenceNumber& other) const -{ - return other < *this; -} - -bool SequenceNumber::operator<=(const SequenceNumber& other) const -{ - return *this == other || *this < other; -} - -bool SequenceNumber::operator>=(const SequenceNumber& other) const -{ - return *this == other || *this > other; -} - void SequenceNumber::encode(Buffer& buffer) const { buffer.putLong(value); @@ -97,12 +43,6 @@ uint32_t SequenceNumber::encodedSize() const { namespace qpid { namespace framing { -int32_t operator-(const SequenceNumber& a, const SequenceNumber& b) -{ - int32_t result = a.value - b.value; - return result; -} - std::ostream& operator<<(std::ostream& o, const SequenceNumber& n) { return o << n.getValue(); } -- cgit v1.2.1