Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

create smaller specific functions only when needed #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zx80
Copy link

@zx80 zx80 commented Aug 2, 2020

Minor code optimization to create a smaller and faster function.

@nackjicholson
Copy link
Collaborator

You can see that I linked this from a couple of spots above in https://github.com/nackjicholson/aiosql

If you're using python 3.6+ you may be able to very easily switch to using that project instead. Or you can take what I did there and apply it. Unfortunately, I no longer am taking the effort to backport fixes I make in aiosql to anosql.

@zx80 Do you have any benchmarks that you used to understand the performance impact of your change?

@zx80
Copy link
Author

zx80 commented Aug 14, 2020

@zx80 Do you have any benchmarks that you used to understand the performance impact of your change?

Nope. The partial eval added is more for the look (elegance, simplicity, minimality) of the generated functions.
Compared to a round trip to a database, the impact should be small, even for a slow language like Python.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants