Author: Remi Meier <[email protected]>
Branch: c8-faster-smallobj-sync
Changeset: r1934:bbc6c59a805c
Date: 2015-08-11 15:06 +0200
http://bitbucket.org/pypy/stmgc/changeset/bbc6c59a805c/
Log: actually yes, quadratic is a problem :)
diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -1813,10 +1813,11 @@
struct list_s *lst = STM_PSEGMENT->small_overflow_obj_ranges;
if (!list_is_empty(lst)) {
- /* try to merge with other ranges (XXX: quadratic, problem?) */
+ /* seems to not help to look for merges in this way: */
stm_char *obj_start = (stm_char*)obj;
long i;
- for (i = lst->count - 2; i >= 0; i -= 2) {
+ long min = lst->count - 4 * 2; /* go back 4 elems */
+ for (i = lst->count - 2; i >= min; i -= 2) {
stm_char *start = (stm_char*)lst->items[i];
ssize_t size = (ssize_t)lst->items[i+1];
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit