-
Notifications
You must be signed in to change notification settings - Fork 92
Remove dynamic dispatch in Hessian evaluation #2740
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
Conversation
I'm very very very hesitant about this. At minimum, I think we should manually write out the switch. Macros and It would also mean we need tests for every possible chunk size to ensure 100% code coverage. |
It's nice, there are already tests that check all of the different chunk sizes. |
I don't agree. We're using a binary switch that is already heavily tested, what's the risk ? |
I've changed to use the binary switch. I wouldn't say that it is "heavily" tested. It's used in one other place.
Not if we have every line tested 😄 |
Maybe that was an over-exageration 😄 But if the binary switch had a bug I prefer MOI to be completely broken rather than having a hidden bug. In that sense, giving it even more coverage is good :) |
As
chunk
is maximum 10, we can reuse the_create_binary_switch
we use for type-stable evaluation of our list of operators to call_eval_hessian_inner
in a type-stable way.On this benchmark #2739 (comment)
Before this PR
After this PR: