chiark / gitweb /
WIP routesearch; allow -Ddebugflags=0
authorIan Jackson <ian@liberator.(none)>
Sat, 3 Oct 2009 20:49:07 +0000 (21:49 +0100)
committerIan Jackson <ian@liberator.(none)>
Sat, 3 Oct 2009 20:49:07 +0000 (21:49 +0100)
yarrg/TODO
yarrg/common.h
yarrg/rsmain.c

index ec4daed8f1eea74ed1ba673df509f9a61e808b63..80ec177bde915740a8428b5ff78b19f74bd4948e 100644 (file)
@@ -1,5 +1,9 @@
 route optimiser
  - fast version of rsvalue.c ?
+       time ./routesearch -DN 13460 20210 -1 0.005 search 30 7
+       46.478s without -DN
+        9.923 9.920 10.026 9.963 10.072 with -DN
+        9.905 9.935  9.948 9.916  9.997 with debugging compiled right out
  - performance improvements
 
 create index sell_by_islandonly on sell (islandid, commodid, price);
index 22f61cbc4c833029675afdde31d57739717fe2f7..09bb391392e8d84f71e5de5f2c9b210d0cc7add9 100644 (file)
@@ -83,7 +83,9 @@ enum {
 
 #endif /*DEBUG_FLAG_LIST*/
 
+#ifndef debug_flags
 extern unsigned debug_flags;
+#endif
 
 void debug_flush(void);
 #ifndef debug
index 7904c013c1362b622d13017d54ce6ed351e689b1..868d790411d4db5afd9457349f0f1a9b2d684103 100644 (file)
@@ -10,15 +10,20 @@ int max_dist= -1;
 int main(int argc, const char **argv) {
   const char *arg;
 
+#ifndef debug_flags
   debug_flags= ~( dbg_sql2 );
+#endif
   sysassert( !setvbuf(debug,0,_IOLBF,0) );
   
   for (;;) {
     arg= *++argv;
     if (arg[0] != '-') break;
+#ifndef debug_flags
     if (!strcmp(arg,"-DN")) {
       debug_flags= 0;
-    } else {
+    } else
+#endif
+    {
       abort();
     }
   }