From 208c794def61eb819ed6eebe1d51867613addce0 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 16 Jun 2015 09:54:31 -0700 Subject: Replace gperf-based entity lookup with binary tree lookup. The primary advantage is a big reduction in the size of the compiled library and executable (> 100K). There should be no measurable performance difference in normal documents. I detected a slight performance hit (around 5%) in a file containing 1,000,000 entities. * Removed `src/html_unescape.gperf` and `src/html_unescape.h`. * Added `src/entities.h` (generated by `tools/make_entities_h.py`). * Added binary tree lookup functions to `houdini_html_u.c`, and use the data in `src/entities.h`. --- src/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 716b97b..06de9ef 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,9 +14,9 @@ set(HEADERS utf8.h scanners.h inlines.h - html_unescape.h houdini.h cmark_ctype.h + entities.h ) set(LIBRARY_SOURCES cmark.c @@ -33,7 +33,6 @@ set(LIBRARY_SOURCES xml.c html.c commonmark.c - html_unescape.gperf houdini_href_e.c houdini_html_e.c houdini_html_u.c -- cgit v1.2.3