Code formatting cleanup

This commit is contained in:
Dan Bader
2021-02-23 09:10:29 -08:00
committed by GitHub
parent ebb2a21a65
commit 727edfedf2
+10 -12
View File
@@ -168,25 +168,23 @@ What's the difference in speed? Let's try it!
.. code-block:: python .. code-block:: python
import time import time
#activate pyx compiler # Activate pyx compiler
import pyximport import pyximport
pyximport.install() pyximport.install()
#primes implemented with Cython import primesCy # primes implemented with Cython
import primesCy import primes # primes implemented with Python
#primes implemented with Python
import primes
print("Cython:") print("Cython:")
t1= time.time() t1 = time.time()
print(primesCy.primes(500)) print(primesCy.primes(500))
t2= time.time() t2 = time.time()
print("Cython time: %s" %(t2-t1)) print("Cython time: %s" % (t2 - t1))
print("") print("")
print("Python") print("Python")
t1= time.time() t1 = time.time()
print(primes.primes(500)) print(primes.primes(500))
t2= time.time() t2 = time.time()
print("Python time: %s" %(t2-t1)) print("Python time: %s" % (t2 - t1))
These lines both need a remark: These lines both need a remark: