Commit e95d406f authored by Neil Gershenfeld's avatar Neil Gershenfeld

wip

parent 64ece36d
Pipeline #4917 passed with stage
in 1 second
......@@ -18,10 +18,10 @@ def calc():
for i in range(1,(NPTS+1)):
pi += a/((i-b)*(i-c))
return pi
pi = calc() # first call to compile the function
start_time = time.time()
pi = calc()
pi = calc() # second call uses the cached compilation
end_time = time.time()
mflops = NPTS*5.0/(1.0e6*(end_time-start_time))
print("NPTS = %d, pi = %f"%(NPTS,pi))
print("time = %f, estimated MFlops = %f"%(end_time-start_time,mflops))
......@@ -16,11 +16,11 @@
|16.1|[pi.html](https://pub.pages.cba.mit.edu/pi/JavaScript/pi.html)|JavaScript, 6 workers|Intel i7-8700T|Nov 17, 2018|
|15.7|[clusterpi.js](Node/clusterpi.js)|Node, 6 workers|Intel i7-8700T|Dec 8, 2018|
|9.37|[pi.c](C/pi.c)|C<br>gcc pi.c -o pi -lm -O3 -ffast-math|Intel i7-8700T|Nov 17, 2018|
|4.87|[numbapi.py](Python/numbapi.py)|Python, Numba|Intel i7-8700T|February 6, 2020|
|3.73|[pi.html](https://pub.pages.cba.mit.edu/pi/JavaScript/pi.html)|JavaScript, 1 worker|Intel i7-8700T|Nov 17, 2018|
|3.47|[pi.html](https://pub.pages.cba.mit.edu/pi/JavaScript/pi.html)|JavaScript, 1 worker|Intel 2x E5-2680|Nov 19, 2018|
|3.29|[pi.js](Node/pi.js)|Node|Intel i7-8700T|Dec 8, 2018|
|3.12|[clusterpi.js](Node/clusterpi.js)|Node, 1 worker|Intel i7-8700T|Dec 8, 2018|
|2.66|[numbapi.py](Python/numbapi.py)|Python, Numba|Intel i7-8700T|February 6, 2020|
|0.57|[pi.c](C/pi.c)|C<br>gcc pi.c -o pi -lm|Intel i7-8700T|Nov 17, 2018|
|0.47|[numpi.py](Python/numpi.py)|Python, NumPy|Intel i7-8700T|Nov 17, 2018|
|0.029|[pi.py](Python/pi.py)|Python|Intel i7-8700T|Nov 17, 2018|
......
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