Commit Graph

8 Commits

Author SHA1 Message Date
Derrick Moser
8860c052b8 Bug 872497 - Remove problematic "optimization" in NS_QuickSort. r=jlebar
This change allows us to avoid O(n^2) performance when partially sorted data
is given to NS_QuickSort.  We no longer attempt an insertion sort if the input
appears pre-sorted.  This brings the expected performance back to O(n*log(n))
but also eliminates the possibility of O(n) best case performance.  Attempts
to achieve O(n) performance should be the responsibility of callers as they
are in a better position to evaluate the costs/benefit trade-off of looking
for special cases that can be sorted quicker.
2013-05-18 15:16:02 -04:00
Mats Palmgren
44d63e6f91 Bug 786533 - Replace NS_MIN/NS_MAX in xpcom/ with XPCOM_MIN/XPCOM_MAX to prevent accidental use. r=ehsan 2013-01-15 13:22:03 +01:00
Nathan Froyd
9738536099 Bug 796119 - part 2: don't #include prtypes.h in xpcom/ unless absolutely necessary; r=ehsan
"absolutely necessary" in this context means "needs PRUnichar", which is
the reason that nsString.h now #includes prtypes.h.
2012-10-01 17:01:01 -04:00
Ehsan Akhgari
5d0ab6fa28 Backout changeset 9e38c5518605, fc59bd8d49ba, d0ba1abde985, and acf91f25f228 (bugs 796119, 796279, and 797106) because of broken reftests on 64-bit platforms 2012-10-02 23:16:36 -04:00
Nathan Froyd
d1cd4155c7 Bug 796119 - part 2: don't #include prtypes.h in xpcom/ unless absolutely necessary; r=ehsan
"absolutely necessary" in this context means "needs PRUnichar", which is
the reason that nsString.h now #includes prtypes.h.
2012-10-01 17:01:01 -04:00
Isaac Aggrey
e5d101621c Bug 795507: Remove usage of PR_BEGIN_EXTERN_C and PR_END_EXTERN_C; r=ehsan 2012-09-30 21:10:22 -05:00
Dominic Fandrey
0ab2f46136 Bug 645398 - Substitute PR_(MAX|MIN|ABS|ROUNDUP) macro calls; r=roc 2011-06-02 14:56:50 +02:00
hg@mozilla.com
465265d0d4 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT, 2007-03-22 10:30:00 -07:00