Author: Remi Meier Branch: c7 Changeset: r706:a4bc64e1d240 Date: 2014-02-07 10:46 +0100 http://bitbucket.org/pypy/stmgc/changeset/a4bc64e1d240/
Log: small changes diff --git a/c7/core.c b/c7/core.c --- a/c7/core.c +++ b/c7/core.c @@ -205,6 +205,7 @@ assert(READMARKER_START < READMARKER_END); assert(READMARKER_END <= 4096UL * FIRST_OBJECT_PAGE); assert(FIRST_OBJECT_PAGE < NB_PAGES); + assert((NB_NURSERY_PAGES * 4096) % NURSERY_SECTION == 0); object_pages = mmap(NULL, TOTAL_MEMORY, PROT_READ | PROT_WRITE, diff --git a/c7/core.h b/c7/core.h --- a/c7/core.h +++ b/c7/core.h @@ -134,7 +134,11 @@ /* ==================== HELPERS ==================== */ - +#ifdef NDEBUG +#define OPT_ASSERT(cond) do { if (!(cond)) __builtin_unreachable(); } while (0) +#else +#define OPT_ASSERT(cond) assert(cond) +#endif #define LIKELY(x) __builtin_expect(x, true) #define UNLIKELY(x) __builtin_expect(x, false) #define IMPLY(a, b) (!(a) || (b)) diff --git a/duhton/demo/synth.duh b/duhton/demo/synth.duh --- a/duhton/demo/synth.duh +++ b/duhton/demo/synth.duh @@ -68,9 +68,14 @@ (setq RAND_MAX 8) (setq CONFL_IF_BELOW 1) +(print (quote N:) N) +(print (quote RAND_MAX:) RAND_MAX) +(print (quote CONFL_IF_BELOW:) CONFL_IF_BELOW) + +(setq timer (time)) +(print (quote setup-transactions:) timer) (setq shared (container 0)) - (setq rand-list (random_list N RAND_MAX)) (setq i 0) (while (< i N) @@ -85,6 +90,9 @@ (setq i (+ i 1)) ) +(print (quote setup-time-diff:) (- (time) timer)) +(setq timer (time)) (run-transactions) +(print (quote run-time-diff:) (- (time) timer)) (print (quote shared) (get shared)) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit