Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add content on performance benchmarks. #458

Closed
wants to merge 2 commits into from
Closed

Add content on performance benchmarks. #458

wants to merge 2 commits into from

Conversation

khushi-411
Copy link

@khushi-411 khushi-411 commented Jul 31, 2021

This PR adds content on performance. Follows issue: #370

Please have a look. Thanks!

Rendered markdown link (for ease of readability): https://github.com/khushi-411/numpy.org/blob/master/content/en/benchmark.md

Future work which should be added here according to me are:

  • Algorithms: Classification of Algorithms. Here, I classified it into 5 categories (Transonic jit, Transonic boost, Numba, NumPy, Pure NumPy). Future aims will be to update this into Cython, Pythran, Numba, TransonicJit, Transonic boost, Transonic Cython is any other relevant algorithms that I'm presently not sure about.
  • Graphs: Do we need to iterate over different datasets? We can just select any one or two datasets and the number of times those algorithms are to be implemented and then plot the graph. Does it sound viable?
  • Content: Improve Documentation (Include introduction). I mentioned various libraries in the post. Is that needed? I think that it can be presented in a better way. What do you think about how can I improve it?
  • Code Quality: Profile code and optimize it.

cc: @mattip

@khushi-411 khushi-411 marked this pull request as draft July 31, 2021 04:40
@khushi-411 khushi-411 marked this pull request as ready for review July 31, 2021 04:49
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @khushi-411! Looks like a good start.


## Conclusion

* These benchmarks are run with an Intel Core i7 processor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably belongs in the caption of the graph. With a bit more details about the exact CPU. For example:

$ cat /proc/cpuinfo | grep Intel

And then slightly reformat like: Intel i9-7920X @ 2.90GHz

Copy link
Author

@khushi-411 khushi-411 Aug 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologizes, I will update that. Thanks!


* These codes are originally taken from [here](https://github.com/paugier/nbabel)
* Benchmark code: [here](https://github.com/khushi-411/numpy-benchmarks/blob/0.3/python/benchmark-2.py)
* Graph: [here](https://github.com/khushi-411/numpy-benchmarks/blob/0.3/python/plot-modified-1.py)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linking to your own repo is fine for now. We can make it a separate NumPy repo or put the scripts in an existing repo somewhere, when you are closer to done with this PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure definitely, these are just sample codes. I feel that these need to be improved, and once it's finalized, we can create a repo or update somewhere in the existing repo as you'll wish. Thanks!


### NumPy

NumPy is a most fundamental package for scientific computing in Python. The major advantage of using NumPy is these gives same computational speed as C and Fortran. Let's see our inplementation details:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking what should come next is indeed a comparison with C/C++ and Fortran, like this sentence says?

The accelerators can be a second part of the story.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text should explain that this is a numerical simulation of the N-body problem and giv ethe constraints of the problem

C/C++ and Fortran code simulations can be found in the original repo https://github.com/paugier/nbabel/

# NumPy Benchmarking


![output-modify-2-new](https://user-images.githubusercontent.com/62256509/127653679-5151e22d-d141-4621-abb9-b3e6dd7988b7.jpg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to commit the figure in this PR. The place to put it is static/images/content_images/

@khushi-411 khushi-411 closed this Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants