Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
pi
Commits
e95d406f
Commit
e95d406f
authored
5 years ago
by
Neil Gershenfeld
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
64ece36d
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#4917
passed
5 years ago
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Python/numbapi.py
+2
-2
2 additions, 2 deletions
Python/numbapi.py
README.md
+1
-1
1 addition, 1 deletion
README.md
with
3 additions
and
3 deletions
Python/numbapi.py
+
2
−
2
View file @
e95d406f
...
@@ -18,10 +18,10 @@ def calc():
...
@@ -18,10 +18,10 @@ def calc():
for
i
in
range
(
1
,(
NPTS
+
1
)):
for
i
in
range
(
1
,(
NPTS
+
1
)):
pi
+=
a
/
((
i
-
b
)
*
(
i
-
c
))
pi
+=
a
/
((
i
-
b
)
*
(
i
-
c
))
return
pi
return
pi
pi
=
calc
()
# first call to compile the function
start_time
=
time
.
time
()
start_time
=
time
.
time
()
pi
=
calc
()
pi
=
calc
()
# second call uses the cached compilation
end_time
=
time
.
time
()
end_time
=
time
.
time
()
mflops
=
NPTS
*
5.0
/
(
1.0e6
*
(
end_time
-
start_time
))
mflops
=
NPTS
*
5.0
/
(
1.0e6
*
(
end_time
-
start_time
))
print
(
"
NPTS = %d, pi = %f
"
%
(
NPTS
,
pi
))
print
(
"
NPTS = %d, pi = %f
"
%
(
NPTS
,
pi
))
print
(
"
time = %f, estimated MFlops = %f
"
%
(
end_time
-
start_time
,
mflops
))
print
(
"
time = %f, estimated MFlops = %f
"
%
(
end_time
-
start_time
,
mflops
))
This diff is collapsed.
Click to expand it.
README.md
+
1
−
1
View file @
e95d406f
...
@@ -16,11 +16,11 @@
...
@@ -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|
|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|
|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|
|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.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.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.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|
|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.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.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|
|0.029|
[
pi.py
](
Python/pi.py
)
|Python|Intel i7-8700T|Nov 17, 2018|
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment