new cache for interning strings

This commit is contained in:
Roberto Ierusalimschy
2015-03-04 10:31:21 -03:00
parent a00013c8d0
commit a80cada914
6 changed files with 61 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: llimits.h,v 1.131 2015/02/09 15:41:56 roberto Exp roberto $
** $Id: llimits.h,v 1.132 2015/03/03 19:53:13 roberto Exp roberto $
** Limits, basic types, and some other 'installation-dependent' definitions
** See Copyright Notice in lua.h
*/
@@ -187,6 +187,14 @@ typedef unsigned long Instruction;
#endif
/*
** Size of cache for strings in the API (better be a prime)
*/
#if !defined(STRCACHE_SIZE)
#define STRCACHE_SIZE 127
#endif
/* minimum size for string buffer */
#if !defined(LUA_MINBUFFER)
#define LUA_MINBUFFER 32