libgrapheme

unicode string library
git clone git://git.suckless.org/libgrapheme
Log | Files | Refs | README | LICENSE

commit 4d157807af659ec392043cffd36935eba8c634af
parent 32fbf8efbb801dd603d39e83bda57e369cee8456
Author: Laslo Hunhold <dev@frign.de>
Date:   Sat,  8 Jan 2022 16:56:47 +0100

Rename gen/properties.c to gen/character-properties.c

At first I thought we would have one big lookup-table for all
properties, but it doesn't make sense for multiple reasons. Even though
compression remains great even for more than one property (it goes down
to roughly 95-96%), this still has a drastic impact on performance.
Additionally, as mentioned earlier, this allows better LTO for the use
of a single or few functions (which should be the common case), because
each data-table is separate.

Signed-off-by: Laslo Hunhold <dev@frign.de>

Diffstat:
MMakefile | 10+++++-----
Rgen/properties.c -> gen/character-properties.c | 0
Msrc/character.c | 2+-
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile @@ -15,7 +15,7 @@ DATA =\ GEN =\ gen/character-test\ - gen/properties\ + gen/character-properties\ SRC =\ src/character\ @@ -42,9 +42,9 @@ benchmark/utf8-decode.o: benchmark/utf8-decode.c config.mk gen/character-test.h benchmark/util.o: benchmark/util.c config.mk benchmark/util.h gen/character-prop.o: gen/character-prop.c config.mk gen/util.h gen/character-test.o: gen/character-test.c config.mk gen/util.h -gen/properties.o: gen/properties.c config.mk gen/util.h +gen/character-properties.o: gen/character-properties.c config.mk gen/util.h gen/util.o: gen/util.c config.mk gen/util.h -src/character.o: src/character.c config.mk gen/properties.h grapheme.h src/util.h +src/character.o: src/character.c config.mk gen/character-properties.h grapheme.h src/util.h src/utf8.o: src/utf8.c config.mk grapheme.h src/util.o: src/util.c config.mk gen/types.h grapheme.h src/util.h test/character.o: test/character.c config.mk gen/character-test.h grapheme.h test/util.h @@ -55,13 +55,13 @@ test/util.o: test/util.c config.mk test/util.h benchmark/character: benchmark/character.o benchmark/util.o libgrapheme.a benchmark/utf8-decode: benchmark/utf8-decode.o benchmark/util.o libgrapheme.a gen/character-test: gen/character-test.o gen/util.o -gen/properties: gen/properties.o gen/util.o +gen/character-properties: gen/character-properties.o gen/util.o test/character: test/character.o test/util.o libgrapheme.a test/utf8-encode: test/utf8-encode.o test/util.o libgrapheme.a test/utf8-decode: test/utf8-decode.o test/util.o libgrapheme.a gen/character-test.h: data/GraphemeBreakTest.txt gen/character-test -gen/properties.h: data/emoji-data.txt data/GraphemeBreakProperty.txt gen/properties +gen/character-properties.h: data/emoji-data.txt data/GraphemeBreakProperty.txt gen/character-properties data/emoji-data.txt: wget -O $@ https://www.unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt diff --git a/gen/properties.c b/gen/character-properties.c diff --git a/src/character.c b/src/character.c @@ -4,7 +4,7 @@ #include <stdlib.h> #include <string.h> -#include "../gen/properties.h" +#include "../gen/character-properties.h" #include "../grapheme.h" #include "util.h"