From a211bea6a5f0ad811a679458cffed1e263c0ccfa Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Tue, 27 Apr 2021 18:30:02 +0200 Subject: enable unlocked I/O by default getchar_unlocked is part of POSIX and should be supported by most platforms. On all tested platforms it has a performance benefit, sometimes smallish (<12%), sometimes large (~40%). --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d738559..f79b9da 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,10 @@ SFEED_CFLAGS = ${CFLAGS} SFEED_LDFLAGS = ${LDFLAGS} SFEED_CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE +# uncomment for convervative locked I/O. +#SFEED_CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE \ +# -DGETNEXT=getchar + BIN = \ sfeed\ sfeed_atom\ -- cgit v1.2.3