summaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-11-26 16:59:20 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-11-26 16:59:20 -0200
commitd015f1fc02e03864b0ed3ad668a6e0660417a718 (patch)
tree00b5962e40540bbb8a71bf8665fed256182aa6c7 /lgc.c
parent790690a2236ab0ad0cce35551c17e62064b4c85b (diff)
downloadlua-d015f1fc02e03864b0ed3ad668a6e0660417a718.tar.gz
lua-d015f1fc02e03864b0ed3ad668a6e0660417a718.tar.bz2
lua-d015f1fc02e03864b0ed3ad668a6e0660417a718.zip
table sizes don't need to be primes; power of 2 gives the same performance.
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lgc.c b/lgc.c
index fe55f3e7..c3259421 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 1.32 1999/11/22 13:12:07 roberto Exp roberto $ 2** $Id: lgc.c,v 1.33 1999/11/23 13:58:02 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -208,7 +208,7 @@ static void collectstring (lua_State *L, int limit) {
208 } 208 }
209 } 209 }
210 if ((tb->nuse+1)*6 < tb->size) 210 if ((tb->nuse+1)*6 < tb->size)
211 luaS_grow(L, tb); /* table is too big; `grow' it to a smaller size */ 211 luaS_resize(L, tb, tb->size/2); /* table is too big */
212 } 212 }
213} 213}
214 214