[pypy-commit] benchmarks default: remove some c4 hacks. may still be useful in c7 but shouldn't be in a benchmark
Remi Meier
noreply at buildbot.pypy.org
Wed Mar 26 10:34:52 CET 2014
Author: Remi Meier
Branch:
Changeset: r241:20ec94a7ed50
Date: 2014-03-26 10:34 +0100
http://bitbucket.org/pypy/benchmarks/changeset/20ec94a7ed50/
Log: remove some c4 hacks. may still be useful in c7 but shouldn't be in
a benchmark
diff --git a/multithread/common/abstract_threading.py b/multithread/common/abstract_threading.py
--- a/multithread/common/abstract_threading.py
+++ b/multithread/common/abstract_threading.py
@@ -62,7 +62,7 @@
import multiprocessing
-_thread_pool = ThreadPool(3 * multiprocessing.cpu_count())
+_thread_pool = ThreadPool(1.5 * multiprocessing.cpu_count())
diff --git a/multithread/raytrace/raytrace.py b/multithread/raytrace/raytrace.py
--- a/multithread/raytrace/raytrace.py
+++ b/multithread/raytrace/raytrace.py
@@ -127,24 +127,15 @@
tasks = 0
def task(x, h, cameraPos, objs, lightSource):
- # force a transaction break here (STM not yet smart enough
- # to figure out that it should break here)
- time.sleep(0)
-
with atomic:
for y in range(h):
ray = Ray(cameraPos,
(Vector(x/50.0-5,y/50.0-5,0)-cameraPos).normal())
trace(ray, objs, lightSource, 10)
- # force a transaction break. updating a global var should
- # be done in a separate transaction:
- time.sleep(0)
-
global tasks
with atomic:
tasks -= 1
- time.sleep(0)
futures = []
def future_dispatcher(ths, *args):
@@ -157,7 +148,6 @@
tasks += 1
futures.append(Future(task, *args))
- time.sleep(0)
More information about the pypy-commit
mailing list