提交 3ea09f9c 编写于 作者: V Vlad Brezae

[sgen] Performance improvement for ms_block_size computations

This reduces regressions for switching from MS_BLOCK_SIZE compile time constant
to ms_block_size variable by 85% on the tests where this was showing up. In the
future we should implement a block allocator, which would, amongst other benefits,
enable us to remove the block-size/page-size dependency.
上级 abd1bd5d
......@@ -1409,10 +1409,10 @@ static inline void
sweep_block_for_size (MSBlockInfo *block, int count, int obj_size)
{
int obj_index;
void *obj = MS_BLOCK_OBJ_FOR_SIZE (block, 0, obj_size);
for (obj_index = 0; obj_index < count; ++obj_index) {
for (obj_index = 0; obj_index < count; ++obj_index, obj = (void*)((mword)obj + obj_size)) {
int word, bit;
void *obj = MS_BLOCK_OBJ_FOR_SIZE (block, obj_index, obj_size);
MS_CALC_MARK_BIT (word, bit, obj);
if (MS_MARK_BIT (block, word, bit)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册