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

Double dispatch visitor for add #1058

Open
wants to merge 12 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@isuruf
Member

isuruf commented Aug 6, 2016

This is part of making polynomials and series classes work with other Symbolic types.

One disadvantage is that if there are n types, then the compiler will generate n x n number of methods leading to a small increase in compilation time and binary size.

TODO:

  • - Add
    • - Series
    • - Polynomial
  • - Mul
  • - Pow
  • - Refactor so that everything except polys and series inherit from Symbolic
  • - Refactor number
@certik

This comment has been minimized.

Show comment
Hide comment
@certik

certik Aug 7, 2016

Contributor

Thanks for working on this, I think it's cleaner. However, how is speed affected?

Contributor

certik commented Aug 7, 2016

Thanks for working on this, I think it's cleaner. However, how is speed affected?

@isuruf

This comment has been minimized.

Show comment
Hide comment
@isuruf

isuruf Aug 7, 2016

Member

All the benchmarks in C++ don't really use add and the benchmarks are unaffected.

Member

isuruf commented Aug 7, 2016

All the benchmarks in C++ don't really use add and the benchmarks are unaffected.

@isuruf

This comment has been minimized.

Show comment
Hide comment
@isuruf

isuruf Aug 7, 2016

Member

I'll check the PyDy benchmark, since Python wrappers use add a lot.

Member

isuruf commented Aug 7, 2016

I'll check the PyDy benchmark, since Python wrappers use add a lot.

@isuruf

This comment has been minimized.

Show comment
Hide comment
@isuruf

isuruf Aug 7, 2016

Member

It seems speed is not affected for PyDy benchmark as well.

Member

isuruf commented Aug 7, 2016

It seems speed is not affected for PyDy benchmark as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment