-
Notifications
You must be signed in to change notification settings - Fork 220
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
[BUG]: Runtime is not as expected #918
Comments
note that using perhaps it would be faster with |
Thanks @wojdyr , that's right. C++ cannot vectorize over an arbitrary
If you are comparing performance across projects, you will also want to add the |
Thank you for all of the responses, For @wojdyr , I have tried using ![]() And for @wjakob suggestions, I also tried this suggestion, but unfortunately, the result is not as expected. ![]() Somehow, the performance is better just with Thank you. CMakeList.txt
array.cpp
|
Just some quick thoughts:
Anyway, I hope something above is useful or sparks an idea.... |
Hi @hansenidden18, it's still weird that nanobind would be 200ms slower :-/. Can you post a full reproducer including your python driver script? |
ping @hansenidden18 |
Hi, @wjakob , sorry for the late reply, Here I provide all of the code that I used
And here is the nanobind implementation
Lastly, this is my CMakeLists.txt
Thank you. |
Problem description
Dear developer,
I was trying to compare the interface overhead between nanobind vs pybind vs python with a simple numpy.sum() replication. I found that nanobind result was not as I expected, even after I had already passed the value by reference.
The result I attached shows that Nanobind runs much slower than Pybind and Python itself. I think Nanobind should run faster than Pybind, at least. Here is my code for the Nanobind numpy calculation. Do I misuse it?
Thank you.
Reproducible example code
The text was updated successfully, but these errors were encountered: