From 27b5b707bcd280cd2cc4e2a2a5cc17eb4e06347a Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Thu, 5 Aug 2010 23:46:55 -0300 Subject: [PATCH] Revert "Skip non-scanneable words in chunks" This reverts commit 5578146600d4ace17878e3b010aa09efdb202fb4, because doing so many extra tests proved to be a "pessimization" in practice. Avoiding the extra bit operations does help a little though, so that change is not reverted. --- rt/gc/cdgc/gc.d | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/rt/gc/cdgc/gc.d b/rt/gc/cdgc/gc.d index b62d1be..3a925fc 100644 --- a/rt/gc/cdgc/gc.d +++ b/rt/gc/cdgc/gc.d @@ -621,18 +621,7 @@ void mark(void *pbot, void *ptop, size_t* pm_bitmask) //printf("marking range: %p -> %p\n", pbot, ptop); for (; p1 + type_size <= p2; p1 += type_size) { - size_t n = 0; - if (has_type_info) { - while (n < type_size && pm_bits[n / BITS_PER_WORD] == 0) - n += BITS_PER_WORD; - if (n < type_size && (pm_bits[n / BITS_PER_WORD] & - ((1 << (BITS_PER_WORD / 2)) - 1)) == 0) - n += BITS_PER_WORD / 2; - else if (n < type_size && (pm_bits[n / BITS_PER_WORD] & - ((1 << (BITS_PER_WORD / 4)) - 1)) == 0) - n += BITS_PER_WORD / 4; - } - for (; n < type_size; n++) { + for (size_t n = 0; n < type_size; n++) { // scan bit set for this word if (has_type_info && !(pm_bits[n / BITS_PER_WORD] & (1 << (n % BITS_PER_WORD)))) -- 2.43.0