RCSID sync from oksh; reduce hash table #elements if !MKSH_SMALL to speed up

This commit is contained in:
tg
2012-03-03 21:30:59 +00:00
parent 82ebd9320b
commit e141394a83
5 changed files with 36 additions and 24 deletions

10
var.c
View File

@@ -26,7 +26,7 @@
#include <sys/sysctl.h>
#endif
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.140 2011/12/31 00:47:46 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.141 2012/03/03 21:30:59 tg Exp $");
/*-
* Variables
@@ -74,8 +74,8 @@ newblock(void)
l->argv = e->loc->argv;
}
l->exit = l->error = NULL;
ktinit(&l->area, &l->vars, 0);
ktinit(&l->area, &l->funs, 0);
ktinit(&l->area, &l->vars, 0, 0);
ktinit(&l->area, &l->funs, 0, 0);
l->next = e->loc;
e->loc = l;
}
@@ -130,8 +130,8 @@ initvar(void)
struct tbl *tp;
ktinit(APERM, &specials,
/* currently 12 specials -> 80% of 16 (2^4) */
4);
/* currently 12 specials */
/* 80% of 16 = 2^4 */ 4, /* 66% of 32 = 2^5 */ 5);
while (i < V_MAX - 1) {
tp = ktenter(&specials, initvar_names[i],
hash(initvar_names[i]));