Linux server2.hpierson.com 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
Apache
: 162.0.216.123 | : 216.73.216.152
28 Domain
?7.4.33
yvffpqmy
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
python36-Cython-0.28.6 /
Demos /
[ HOME SHELL ]
Name
Size
Permission
Action
?;
benchmarks
[ DIR ]
drwxr-xr-x
?;
callback
[ DIR ]
drwxr-xr-x
?;
embed
[ DIR ]
drwxr-xr-x
?;
freeze
[ DIR ]
drwxr-xr-x
?;
libraries
[ DIR ]
drwxr-xr-x
Makefile
334
B
-rw-r--r--
Makefile.nodistutils
390
B
-rw-r--r--
README.rst
814
B
-rw-r--r--
integrate0.py
148
B
-rw-r--r--
integrate1.pyx
177
B
-rw-r--r--
integrate2.pyx
236
B
-rw-r--r--
integrate_timing.py
427
B
-rw-r--r--
numpy_demo.pyx
191
B
-rw-r--r--
overflow_perf.pyx
4.26
KB
-rw-r--r--
overflow_perf_run.py
1.94
KB
-rw-r--r--
primes.pyx
402
B
-rw-r--r--
pyprimes.py
240
B
-rw-r--r--
run_numeric_demo.py
114
B
-rw-r--r--
run_primes.py
179
B
-rw-r--r--
run_spam.py
184
B
-rw-r--r--
setup.py
660
B
-rw-r--r--
spam.pyx
406
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : overflow_perf_run.py
from __future__ import absolute_import, print_function from overflow_perf import * import sys import timeit try: import numpy as np except ImportError: np = None def run_tests(N): global f for func in most_orthogonal, fib, collatz, factorial: print(func.__name__) for type in ['int', 'unsigned int', 'long long', 'unsigned long long', 'object']: if func == most_orthogonal: if type == 'object' or np == None: continue type_map = {'int': 'int32', 'unsigned int': 'uint32', 'long long': 'int64', 'unsigned long long': 'uint64'} shape = N, 3 arg = np.ndarray(shape, dtype=type_map[type]) arg[:] = 1000 * np.random.random(shape) else: arg = N try: print("%s[%s](%s)" % (func.__name__, type, N)) with_overflow = my_timeit(globals()[func.__name__ + "_overflow"][type], arg) no_overflow = my_timeit(func[type], arg) print("\t%0.04e\t%0.04e\t%0.04f" % (no_overflow, with_overflow, with_overflow / no_overflow)) if func.__name__ + "_overflow_fold" in globals(): with_overflow = my_timeit(globals()[func.__name__ + "_overflow_fold"][type], arg) print("\t%0.04e\t%0.04e\t%0.04f (folded)" % ( no_overflow, with_overflow, with_overflow / no_overflow)) except OverflowError: print(" ", "Overflow") def my_timeit(func, N): global f, arg f = func arg = N for exponent in range(10, 30): times = 2 ** exponent res = min(timeit.repeat("f(arg)", setup="from __main__ import f, arg", repeat=5, number=times)) if res > .25: break return res / times params = sys.argv[1:] if not params: params = [129, 9, 97] for arg in params: print() print("N", arg) run_tests(int(arg))
Close