diff mercurial/util.h @ 24443:539b3c7eea44

phase: compute phases in C Previously, the phase computation would grow much slower as the oldest draft commit in the repository grew older (which is very common in repos with evolve on) and the number of commits increase. By rewriting the computation in C we can speed it up from 700ms to 7ms on a large repository whose oldest draft commit is a year old.
author Laurent Charignon <lcharignon@fb.com>
date Tue, 24 Mar 2015 11:00:09 -0700
parents 98042b0e19f9
children 1c533e23ce95
line wrap: on
line diff
--- a/mercurial/util.h	Wed Mar 25 14:16:10 2015 -0500
+++ b/mercurial/util.h	Tue Mar 24 11:00:09 2015 -0700
@@ -209,6 +209,7 @@
 	return ret;
 }
 
+#define MIN(a, b) (((a)<(b))?(a):(b))
 /* VC9 doesn't include bool and lacks stdbool.h based on my searching */
 #ifdef _MSC_VER
 #define true 1