From 374dd658a605a794b307642e87295f468d29d56a Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 16 Sep 2009 14:40:56 +0000 Subject: Lookup hashes are now static tables, ordered first-level by second character, then randomly along a chain. Improves performance by a small fraction and considerably cleans up hash sources. --- mdoc_macro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mdoc_macro.c') diff --git a/mdoc_macro.c b/mdoc_macro.c index a0d739c7..0a54bc77 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.33 2009/08/20 08:59:12 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.34 2009/09/16 14:40:56 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -275,7 +275,7 @@ lookup_raw(struct mdoc *mdoc, const char *p) { int res; - if (MDOC_MAX == (res = mdoc_hash_find(mdoc->htab, p))) + if (MDOC_MAX == (res = mdoc_hash_find(p))) return(MDOC_MAX); if (MDOC_CALLABLE & mdoc_macros[res].flags) return(res); -- cgit v1.2.3