From 491b7775b273daf1325a1b050345dbf75b394315 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sun, 11 Jan 2015 01:08:02 +0100 Subject: Reduce size of gperf entity table Don't store length of UTF-8 string. It can be computed by NULL-terminating strings shorter than 4 bytes and using strnlen. Use gperf's string pool option. This allows to use an 'int' index into the string pool instead of a pointer and is helpful on 64-bit systems. Shaves about 75 KB off the 32-bit binaries on Linux and 128 KB off the 64-bit binaries on OS X. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5d421e8..c5665e4 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,7 @@ clean: # normally need to be generated. $(SRCDIR)/html_unescape.h: $(SRCDIR)/html_unescape.gperf gperf -L ANSI-C -I -t -N find_entity -H hash_entity -K entity -C -l \ - -F ',0,{0}' --null-strings -m5 $< > $@ + -F ',{0}' --null-strings -m5 -P -Q entity_pool $< > $@ # We include case_fold_switch.inc in the repository, so this shouldn't # normally need to be generated. -- cgit v1.2.3