Commit 65c8fa68 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge commit 'a48c123d' into refcounting

parents 89f00d52 a48c123d
......@@ -19,9 +19,27 @@ We have some documentation for those interested in contributing: see our [Develo
### Roadmap
##### v0.1: [released 4/2/2014](https://tech.dropbox.com/2014/04/introducing-pyston-an-upcoming-jit-based-python-implementation/)
- Focus was on building and validating the core Python-to-LLVM JIT infrastructure.
- Many core parts of the language were missing.
##### v0.5: Coming soon
- Focus is on being ready to run Dropbox's production services. Initial plan:
- Support for a final few esoteric Python features
- Better stability and performance (but particularly for the Dropbox servers)
##### v0.4: [released 11/3/2015](http://blog.pyston.org/2015/11/03/102/)
- Many new features and better language support
- Passes most of the tests of several famous python libraries
- Unicode support
- GC finalizer
- much improved C API support
- Better performance
- Custom C++ exception handler
- Object Cache (improves startup time)
- Baseline JIT
##### v0.3: [released 2/24/2015](http://blog.pyston.org/2015/02/24/pyston-0-3-self-hosting-sufficiency/)
- Better language support
- Can self-host all of our internal Python scripts
- Better performance
- Match CPython's performance on our small benchmark suite
##### v0.2: [released 9/11/2014](http://blog.pyston.org/2014/09/11/9/)
- Focus was on improving language compatibility to the point that we can start running "real code" in the form of existing benchmarks.
......@@ -35,24 +53,9 @@ We have some documentation for those interested in contributing: see our [Develo
- Multithreading support
- We have allowed performance to regress, sometimes considerably, but (hopefully) in places that allow for more efficient implementations as we have time.
##### v0.3: [released 2/24/2015](http://blog.pyston.org/2015/02/24/pyston-0-3-self-hosting-sufficiency/)
- Better language support
- Can self-host all of our internal Python scripts
- Better performance
- Match CPython's performance on our small benchmark suite
##### v0.4: [released 10/31/2015]
- Many new features and better language support
- Passes most of the tests of several famous python libraries
- Unicode support
- GC finalizer
- much improved C API support
- Better performance
- Custom C++ exception handler
- Object Cache (improves startup time)
- Baseline JIT
##### v0.5: Coming soon
##### v0.1: [released 4/2/2014](https://tech.dropbox.com/2014/04/introducing-pyston-an-upcoming-jit-based-python-implementation/)
- Focus was on building and validating the core Python-to-LLVM JIT infrastructure.
- Many core parts of the language were missing.
### Trying it out
......
N = 1024
def f(n):
l = []
assert N % n == 0
while len(l) < N:
l += range(n)
t = 0
for _ in xrange(2000):
for i in l:
if i & 1: t += 1
else: t += 2
if i & 2: t += 1
else: t += 2
if i & 4: t += 1
else: t += 2
if i & 8: t += 1
else: t += 2
if i & 16: t += 1
else: t += 2
if i & 32: t += 1
else: t += 2
if i & 64: t += 1
else: t += 2
if i & 128: t += 1
else: t += 2
if i & 256: t += 1
else: t += 2
if i & 512: t += 1
else: t += 2
# print t
import sys
f(int(sys.argv[1]))
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../test/testsuite/lib/django"))
sys.path.append(os.path.join(os.path.dirname(__file__), "../test/lib/django"))
BENCHMARK_SUITE_DIR = os.path.join(os.path.dirname(__file__), "../../pyston-perf/benchmarking/benchmark_suite")
sys.path.extend([os.path.join(BENCHMARK_SUITE_DIR, "django_template2_site")])
......
M = 64
N = 64
def f(m, n):
assert N % n == 0
assert M % m == 0
l1 = []
for i in xrange(m):
class C(object):
pass
c = C()
c.x = i
l1.append(c)
lm = []
while len(lm) < M:
lm += l1
ln = []
while len(ln) < N:
ln += range(n)
t = 0
for _ in xrange(400):
for i in ln:
for o in lm:
if i & 1: t += o.x
else: t -= o.x
if i & 2: t += o.x
else: t -= o.x
if i & 4: t += o.x
else: t -= o.x
if i & 8: t += o.x
else: t -= o.x
if i & 16: t += o.x
else: t -= o.x
if i & 32: t += o.x
else: t -= o.x
if i & 64: t += o.x
else: t -= o.x
if i & 128: t += o.x
else: t -= o.x
if i & 256: t += o.x
else: t -= o.x
if i & 512: t += o.x
else: t -= o.x
# print t
import sys
f(int(sys.argv[1]), int(sys.argv[2]))
N = 1024
def f(n):
l = []
assert N % n == 0
l2 = []
for i in xrange(n):
class C(object):
pass
c = C()
c.x = i
l2.append(c)
while len(l) < N:
l += l2
t = 0
for _ in xrange(20000):
for o in l:
t += o.x
import sys
f(int(sys.argv[1]))
import os
import subprocess
import time
EXECUTABLES = [
'python',
os.path.join(os.path.dirname(__file__), '../pyston_pgo'),
os.path.join(os.path.dirname(__file__), '../../pyston_related/pypy-4.0.0-linux64/bin/pypy')
]
BENCHMARKS = [
os.path.join(os.path.dirname(__file__), 'megamorphic_control_flow.py')
]
ARGS = [[str(2**i), "16"] for i in xrange(0, 7)]
BENCHMARKS = [
os.path.join(os.path.dirname(__file__), 'control_flow_ubench.py'),
os.path.join(os.path.dirname(__file__), 'megamorphic_ubench.py')
]
ARGS = [[str(2**i)] for i in xrange(0, 10)]
NRUNS = 3
for b in BENCHMARKS:
print os.path.basename(b)
for args in ARGS:
print ' '.join(args)
for exe in EXECUTABLES:
print os.path.basename(exe)
for args in ARGS:
best = float('inf')
for _ in xrange(NRUNS):
start = time.time()
subprocess.check_call([exe, b] + args)
elapsed = time.time() - start
best = min(best, elapsed)
print best
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment