You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Peroxide 0.30, only up to 2nd order ADs are allowed. This is because of implemented structures. There are three kinds of available AD implementations :
Enum
Pros: Simple & Fast (on Stack)
Cons: For higher order AD, total size increases. (every members of enum has same size)
proc-macro
Pros: Fast & Effective
Cons: Heavy compile time (Can it be better in the future?)
Wrapper of Vec
Pros: Easy to implement higher order AD
Cons: Not effective (on Heap)
I used proc-macro until Peroxide 0.28, but I changed to Enum at 0.30. Enumis sufficient to calculate 2nd order univariate AD, but at higher order, it can be ineffective. (I'll check)
If we return toproc-macro, then it would guarantee best runtime performance. But it also provide worst compile time. If there is solution for reducing compile time, it will be the best choice.
And if we forgo our runtime performance, then we can get most convenient implementation - just wrapper of Vec.
Which do you think the best? Or if you have any other idea, then please let me know.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In Peroxide 0.30, only up to 2nd order ADs are allowed. This is because of implemented structures. There are three kinds of available AD implementations :
Enum
proc-macro
Vec
I used
proc-macro
until Peroxide 0.28, but I changed toEnum
at 0.30.Enum
is sufficient to calculate 2nd order univariate AD, but at higher order, it can be ineffective. (I'll check)If we return to
proc-macro
, then it would guarantee best runtime performance. But it also provide worst compile time. If there is solution for reducing compile time, it will be the best choice.And if we forgo our runtime performance, then we can get most convenient implementation - just wrapper of
Vec
.Which do you think the best? Or if you have any other idea, then please let me know.
Beta Was this translation helpful? Give feedback.
All reactions