From 346aacf27f9bdfe8416efc30e2611f53dfc0cf5c Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 5 Nov 2014 00:27:15 +0200 Subject: unix: fast: Set initial module dict size big to have high pystone score. For this, introduce MICROPY_MODULE_DICT_SIZE config setting. --- py/objmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objmodule.c') diff --git a/py/objmodule.c b/py/objmodule.c index 01349c3d2..7f765ff95 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -96,7 +96,7 @@ mp_obj_t mp_obj_new_module(qstr module_name) { mp_obj_module_t *o = m_new_obj(mp_obj_module_t); o->base.type = &mp_type_module; o->name = module_name; - o->globals = mp_obj_new_dict(1); + o->globals = mp_obj_new_dict(MICROPY_MODULE_DICT_SIZE); // store __name__ entry in the module mp_obj_dict_store(o->globals, MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(module_name)); -- cgit v1.2.3