-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Improve ArrayRef #9610
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
Improve ArrayRef #9610
Conversation
|
In what sort of use cases did you see a performance improvement? |
|
Sorry, I probably formulated that a bit misleadingly. It doesn't improve perf for existing use cases, but it allows ArrayRef to be used in constexpr environments in future (for example for c10). Constexpr per se doesn't improve perf. Some expressions can be evaluated at compile time and some cannot. For expressions that can be evaluated at compile time, many compilers will do so, even if you don't add the "constexpr" keyword. What the "constexpr" keyword does is it asserts that the expression can be evaluated at compile time. So it makes sure that the stuff you want to be run at compile time actually can be done so. And it needs to be added to functions or methods if you want to call them from a constexpr environment (i.e. from another function or method that is constexpr). |
08862d5 to
dd6754a
Compare
dd6754a to
ea8159a
Compare
ea8159a to
88401ed
Compare
88401ed to
fe357d8
Compare
fe357d8 to
b984098
Compare
b984098 to
39bd8ce
Compare
39bd8ce to
d860abb
Compare
d860abb to
6d5590d
Compare
6d5590d to
c30dc83
Compare
c30dc83 to
691e07b
Compare
4f479ca to
acbb697
Compare
acbb697 to
8af308b
Compare
8af308b to
da0da46
Compare
da0da46 to
3ed89fc
Compare
3ed89fc to
80f96cf
Compare
80f96cf to
1219f61
Compare
1219f61 to
ead7ace
Compare
ead7ace to
72ca67e
Compare
72ca67e to
e51c10a
Compare
e51c10a to
47c70b2
Compare
47c70b2 to
cc6806b
Compare
Summary: Pull Request resolved: pytorch#9610 Mostly making some stuff in ArrayRef constexpr to give it better perf. Differential Revision: D8926785 fbshipit-source-id: 5403e86e4b1849718f24f0c79b6e70380b3eceaa
cc6806b to
dc0eb6f
Compare
Summary: Pull Request resolved: pytorch/pytorch#9610 Mostly making some stuff in ArrayRef constexpr to give it better perf. Reviewed By: ezyang Differential Revision: D8926785 fbshipit-source-id: af6d4b05fbc69d20855a80f3edc2b501577a742b
Summary: Pull Request resolved: pytorch#9610 Mostly making some stuff in ArrayRef constexpr to give it better perf. Reviewed By: ezyang Differential Revision: D8926785 fbshipit-source-id: af6d4b05fbc69d20855a80f3edc2b501577a742b
Summary: Mostly making some stuff in ArrayRef constexpr to give it better perf.
Differential Revision: D8926785