Branch: Tag:

2016-10-21

2016-10-21 14:09:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>

encode_value: Use MAPPING_FLAG_NO_SHRINK.

The mapping with encoded values is intentionally allocated with
medium sized hashtable. Shrinking it due to use of map_delete()
is just a waste of cpu.

Attempts to improve performance of encode_value() for objects,
programs and functions a bit more.

1767:    initialize_buf(&data->buf);    data->canonic = 0;    data->encoded=allocate_mapping(128); +  data->encoded->data->flags |= MAPPING_FLAG_NO_SHRINK;    data->delayed = allocate_array (0);    SET_SVAL(data->counter, T_INT, NUMBER_NUMBER, integer, COUNTER_START);