From c1f39437d0ad38d1f8d76f9ebf904faa9a7aaaf6 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Wed, 10 May 2006 11:39:12 +0000 Subject: Some optimizations by Volkan YAZICI --- contrib/intarray/_int_op.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'contrib/intarray/_int_op.c') diff --git a/contrib/intarray/_int_op.c b/contrib/intarray/_int_op.c index 7a2065bc21..036c357fb0 100644 --- a/contrib/intarray/_int_op.c +++ b/contrib/intarray/_int_op.c @@ -83,8 +83,6 @@ _int_same(PG_FUNCTION_ARGS) if (avoid || bvoid) return (avoid && bvoid) ? TRUE : FALSE; - SORT(a); - SORT(b); na = ARRNELEMS(a); nb = ARRNELEMS(b); da = ARRPTR(a); @@ -94,7 +92,10 @@ _int_same(PG_FUNCTION_ARGS) if (na == nb) { + SORT(a); + SORT(b); result = TRUE; + for (n = 0; n < na; n++) if (da[n] != db[n]) { -- cgit v1.2.1