From e95d406f7e695afa022293f748c8b38c1c9fc8b2 Mon Sep 17 00:00:00 2001
From: Neil Gershenfeld <gersh@cba.mit.edu>
Date: Thu, 6 Feb 2020 06:59:18 -0500
Subject: [PATCH] wip

---
 Python/numbapi.py | 4 ++--
 README.md         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Python/numbapi.py b/Python/numbapi.py
index 4432dc3..7789856 100755
--- a/Python/numbapi.py
+++ b/Python/numbapi.py
@@ -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))
-
diff --git a/README.md b/README.md
index 3c31a3e..912ba9c 100644
--- a/README.md
+++ b/README.md
@@ -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|
-- 
GitLab