unix: fast: Set initial module dict size big to have high pystone score.

For this, introduce MICROPY_MODULE_DICT_SIZE config setting.
This commit is contained in:
Paul Sokolovsky
2014-11-05 00:27:15 +02:00
parent ff8d0e071c
commit 346aacf27f
3 changed files with 9 additions and 1 deletions

View File

@@ -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));