From 13e87955a6610317dd90b29b116edd5196cbcd56 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Sat, 3 Dec 2011 11:07:41 -0800 Subject: [PATCH] Inline some small, often-used functions (closes #3551) When I first sent this patch to the mailing list in 2008, my benchmarking found a reduction in startup time of 15%. --- ascii.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ascii.c b/ascii.c index 779b9480..1076f8f2 100644 --- a/ascii.c +++ b/ascii.c @@ -34,17 +34,17 @@ #include #include "ascii.h" -int ascii_isupper (int c) +inline int ascii_isupper (int c) { return (c >= 'A') && (c <= 'Z'); } -int ascii_islower (int c) +inline int ascii_islower (int c) { return (c >= 'a') && (c <= 'z'); } -int ascii_toupper (int c) +inline int ascii_toupper (int c) { if (ascii_islower (c)) return c & ~32; @@ -52,7 +52,7 @@ int ascii_toupper (int c) return c; } -int ascii_tolower (int c) +inline int ascii_tolower (int c) { if (ascii_isupper (c)) return c | 32; -- 2.40.0