03-30-2018, 06:57 PM
(This post was last modified: 03-30-2018, 06:59 PM by edwinbmiller.)
reinstalled debian stretch 4.4.77 and did a
apt-get update -y
apt-get install linux-rock64 -y (instead of pt-get upgrade)
then ran the following python
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# python3 pybench_cases.py
Segmentation fault
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# python3 pybench_cases.py
Segmentation fault
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# python3 pybench_cases.py
3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118]
2.1335 ['[x ** 2 for x in range(1000)]']
2.5179 ['res=[]\nfor x in range(1000): res.append(x ** 2)']
3.0498 ['list(map(lambda x: x ** 2, range(1000)))']
2.3948 ['list(x ** 2 for x in range(1000))']
4.7236 ["s = 'spam' * 2500\nx = [s[i] for i in range(10000)]"]
6.6688 ["s = '?'\nfor i in range(10000): s += '?'"]
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# cat pybench_cases.py
"""
pybench_cases.py: Run pybench on a set of pythons and statements.
Select modes by editing this script or using command-line arguments (in
sys.argv): e.g., run a "C:\python27\python pybench_cases.py" to test just
one specific version on stmts, "pybench_cases.py -a" to test all pythons
listed, or a "py -3 pybench_cases.py -a -t" to trace command lines too.
"""
import pybench, sys
pythons = [ # (ispy3?, path)
(1, 'C:\python33\python'),
(0, 'C:\python27\python'),
(0, 'C:\pypy\pypy-1.9\pypy')
]
stmts = [ # (num,rpt,stmt)
(0, 0, "[x ** 2 for x in range(1000)]"), # Iterations
(0, 0, "res=[]\nfor x in range(1000): res.append(x ** 2)"), # \n=multistmt
(0, 0, "$listif3(map(lambda x: x ** 2, range(1000)))"), # \n\t=indent
(0, 0, "list(x ** 2 for x in range(1000))"), # $=list or ''
(0, 0, "s = 'spam' * 2500\nx = [s[i] for i in range(10000)]"), # String ops
(0, 0, "s = '?'\nfor i in range(10000): s += '?'"),
]
tracecmd = '-t' in sys.argv # -t: trace commmand lines?
pythons = pythons if '-a' in sys.argv else None # -a: all in list, else one?
pybench.runner(stmts, pythons, tracecmd)
it gives Segmentation Fault first 2 times i try to run but on 3rd try runs fine
apt-get update -y
apt-get install linux-rock64 -y (instead of pt-get upgrade)
then ran the following python
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# python3 pybench_cases.py
Segmentation fault
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# python3 pybench_cases.py
Segmentation fault
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# python3 pybench_cases.py
3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118]
2.1335 ['[x ** 2 for x in range(1000)]']
2.5179 ['res=[]\nfor x in range(1000): res.append(x ** 2)']
3.0498 ['list(map(lambda x: x ** 2, range(1000)))']
2.3948 ['list(x ** 2 for x in range(1000))']
4.7236 ["s = 'spam' * 2500\nx = [s[i] for i in range(10000)]"]
6.6688 ["s = '?'\nfor i in range(10000): s += '?'"]
root@rock64:/mnt/home/rock64/0636920028154-master-c581427d3e9fc7ef210dd46d112d2eae4043d557/lp5e-code-1.0-jun1813/code# cat pybench_cases.py
"""
pybench_cases.py: Run pybench on a set of pythons and statements.
Select modes by editing this script or using command-line arguments (in
sys.argv): e.g., run a "C:\python27\python pybench_cases.py" to test just
one specific version on stmts, "pybench_cases.py -a" to test all pythons
listed, or a "py -3 pybench_cases.py -a -t" to trace command lines too.
"""
import pybench, sys
pythons = [ # (ispy3?, path)
(1, 'C:\python33\python'),
(0, 'C:\python27\python'),
(0, 'C:\pypy\pypy-1.9\pypy')
]
stmts = [ # (num,rpt,stmt)
(0, 0, "[x ** 2 for x in range(1000)]"), # Iterations
(0, 0, "res=[]\nfor x in range(1000): res.append(x ** 2)"), # \n=multistmt
(0, 0, "$listif3(map(lambda x: x ** 2, range(1000)))"), # \n\t=indent
(0, 0, "list(x ** 2 for x in range(1000))"), # $=list or ''
(0, 0, "s = 'spam' * 2500\nx = [s[i] for i in range(10000)]"), # String ops
(0, 0, "s = '?'\nfor i in range(10000): s += '?'"),
]
tracecmd = '-t' in sys.argv # -t: trace commmand lines?
pythons = pythons if '-a' in sys.argv else None # -a: all in list, else one?
pybench.runner(stmts, pythons, tracecmd)
it gives Segmentation Fault first 2 times i try to run but on 3rd try runs fine