aboutsummaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-09-22 11:18:24 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-09-22 11:18:24 -0300
commit9fae7b6d3fca02b4661aaa7c16e9fbeec8964b9b (patch)
tree03898a73c1aa5c7ae600e1ba11a514b1c50edeef /llimits.h
parent0f1f51be4b1e2fb561b2ec6dce7fe292d5b3764d (diff)
downloadlua-9fae7b6d3fca02b4661aaa7c16e9fbeec8964b9b.tar.gz
lua-9fae7b6d3fca02b4661aaa7c16e9fbeec8964b9b.tar.bz2
lua-9fae7b6d3fca02b4661aaa7c16e9fbeec8964b9b.zip
code for string cache generalized for "associative sets" (compiler
will optimize away or inline the extra loops)
Diffstat (limited to 'llimits.h')
-rw-r--r--llimits.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/llimits.h b/llimits.h
index 29872ca3..d1dff19f 100644
--- a/llimits.h
+++ b/llimits.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llimits.h,v 1.136 2015/07/15 15:57:13 roberto Exp roberto $ 2** $Id: llimits.h,v 1.137 2015/09/08 16:53:56 roberto Exp roberto $
3** Limits, basic types, and some other 'installation-dependent' definitions 3** Limits, basic types, and some other 'installation-dependent' definitions
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -190,10 +190,13 @@ typedef unsigned long Instruction;
190 190
191 191
192/* 192/*
193** Size of cache for strings in the API (better be a prime) 193** Size of cache for strings in the API. 'N' is the number of
194** sets (better be a prime) and "M" is the size of each set (M == 1
195** makes a direct cache.)
194*/ 196*/
195#if !defined(STRCACHE_SIZE) 197#if !defined(STRCACHE_N)
196#define STRCACHE_SIZE 127 198#define STRCACHE_N 63
199#define STRCACHE_M 2
197#endif 200#endif
198 201
199 202