Re: [ovs-dev] [PATCH v3 01/10] lib: Add smap_equal().

2015-07-28 Thread Russell Bryant
On 07/28/2015 02:13 PM, Ben Pfaff wrote: > On Tue, Jul 21, 2015 at 12:59:11PM -0400, Russell Bryant wrote: >> Add a method to determine of two smaps are equal (have the exact same >> set of key-value pairs). >> >> Signed-off-by: Russell Bryant > > Can't this be done in O(n) instead of O(n log n)?

Re: [ovs-dev] [PATCH v3 01/10] lib: Add smap_equal().

2015-07-28 Thread Ben Pfaff
On Tue, Jul 21, 2015 at 12:59:11PM -0400, Russell Bryant wrote: > Add a method to determine of two smaps are equal (have the exact same > set of key-value pairs). > > Signed-off-by: Russell Bryant Can't this be done in O(n) instead of O(n log n)? bool smap_equal(const struct smap *smap1, const

[ovs-dev] [PATCH v3 01/10] lib: Add smap_equal().

2015-07-21 Thread Russell Bryant
Add a method to determine of two smaps are equal (have the exact same set of key-value pairs). Signed-off-by: Russell Bryant --- lib/smap.c | 34 ++ lib/smap.h | 2 ++ 2 files changed, 36 insertions(+) diff --git a/lib/smap.c b/lib/smap.c index 7fe3ce4..86bf89d