Skip to content
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

Use fused types to avoid tempita #22411

Closed
jbrockmendel opened this issue Aug 18, 2018 · 6 comments
Closed

Use fused types to avoid tempita #22411

jbrockmendel opened this issue Aug 18, 2018 · 6 comments
Labels
Internals Related to non-user accessible pandas implementation Refactor Internal refactoring of code

Comments

@jbrockmendel
Copy link
Member

A lot of the cython code is templated to avoid duplication, but is not especially readable (see anything in _libs with filename ending in ".pxi.in").

AFAICT we can use fused types and cython will internally generate all of the relevant functions. If this understanding is correct, the code can be made a lot friendlier.

@WillAyd
Copy link
Member

WillAyd commented Aug 18, 2018

Would be interested in seeing how this works - the templating system is sparsely documented so I'd definitely be +1 if there is a viable alternative

@jreback
Copy link
Contributor

jreback commented Aug 18, 2018

tried this a while back
though we had a lower cython version

personally i don’t think this makes it more readable because of the special cases for object

but certainly give a try

note we for example already have numeric fused types

@jbrockmendel
Copy link
Member Author

but certainly give a try

OK, I'll poke at this after #22329, #22287, #22283 go through; any earlier and I'd be swimming in merge conflicts.

personally i don’t think this makes it more readable because of the special cases for object

It may turn out that way in the end; my intuition is that the learning curve for someone not familiar with tempita will make a pretty big difference.

@gfyoung
Copy link
Member

gfyoung commented Aug 19, 2018

If there were no special cases, I would prefer fused types over tempita as @jbrockmendel is proposing. Curious to see how many functions do not have special cases though...

@gfyoung gfyoung added Refactor Internal refactoring of code Internals Related to non-user accessible pandas implementation labels Aug 19, 2018
@jbrockmendel
Copy link
Member Author

AFAICT this process has gone as far as it can go. Closing.

@jreback
Copy link
Contributor

jreback commented Oct 23, 2018

ok!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internals Related to non-user accessible pandas implementation Refactor Internal refactoring of code
Projects
None yet
Development

No branches or pull requests

4 participants