f98642e44a
* BUG: Be more intelligent when parsing arguments. Now all arguments after the first non option argument are sent to the script process. [INTERPRETER] * OPT: Remove a previous optimization that made benchmarks slower, contrary to what valgrind tells. No idea why exactly, maybe a valgrind cache simulation problem. [BENCHMARKS] * NEW: Do less in the polynom benchmark, so that it runs about as long as the other benchmarks. git-svn-id: svn://localhost/gambas/trunk@6621 867c0c6c-44f3-4631-809d-bfa615b0a4ec
23 lines
348 B
Python
Executable file
23 lines
348 B
Python
Executable file
#!/usr/bin/python
|
|
|
|
n = 500000
|
|
x = 0.2
|
|
|
|
def t(x):
|
|
mu = 10.0
|
|
pu = 0.0
|
|
pol = [0] * 100
|
|
r = range(0,100)
|
|
|
|
for i in range(0,n):
|
|
for j in r:
|
|
pol[j] = mu = (mu + 2.0) / 2.0
|
|
su = 0.0
|
|
for j in r:
|
|
su = x * su + pol[j]
|
|
pu = pu + su
|
|
return pu
|
|
|
|
for i in range(0,4):
|
|
print t(x)
|
|
|