From 1454a04f81708850353dbdc0807a099c5aaab55b Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 21 Feb 2011 07:30:11 +0000 Subject: * Fixups to the make man page * Minor syntax cleanups in the manual * In non-maintainer mode set NDEBUG to disable assert() * Performance improvements in strcache: Build Info 1000 2000 4000 3.82 -g 2.61s 8.85s 33.52s 3.82 -O2 1.90s 7.62s 27.82s New -g (with asserts) 1.03s 2.31s 5.79s New -O2 (no asserts) 0.65s 1.50s 3.52s --- make.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'make.h') diff --git a/make.h b/make.h index ea282df..ea44ee4 100644 --- a/make.h +++ b/make.h @@ -43,6 +43,12 @@ char *alloca (); # endif #endif +/* Disable assert() unless we're a maintainer. + Some asserts are compute-intensive. */ +#ifndef MAKE_MAINTAINER_MODE +# define NDEBUG 1 +#endif + #ifdef CRAY /* This must happen before #include so @@ -60,13 +66,12 @@ char *alloca (); #include #include #include + #ifdef HAVE_SYS_TIMEB_H /* SCO 3.2 "devsys 4.2" has a prototype for `ftime' in that bombs - unless has been included first. Does every system have a - ? If any does not, configure should check for it. */ + unless has been included first. */ # include #endif - #if TIME_WITH_SYS_TIME # include # include @@ -456,8 +461,8 @@ void strcache_init (void); void strcache_print_stats (const char *prefix); int strcache_iscached (const char *str); const char *strcache_add (const char *str); -const char *strcache_add_len (const char *str, int len); -int strcache_setbufsize (int size); +const char *strcache_add_len (const char *str, unsigned int len); +int strcache_setbufsize (unsigned int size); #ifdef HAVE_VFORK_H # include -- cgit v1.2.3