-
Notifications
You must be signed in to change notification settings - Fork 26
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
Python optimization #524
Comments
Not sure if this is mentioned in one of those links, but you can use make sure you don't spend to much time optimizing things that are negligible to the rest of the program |
Also, here's a really simple (untested) decorator that logs the runtime of a function after it's run. With a few project-specific modifications it may be useful import time
def time_fn[F](fn: F) -> F:
def out(*args, **kwargs):
start = time.perf_counter()
fn(*args, **kwargs)
end = time.perf_counter()
logger.log(f'{fn.__name__} took {end - start} seconds')
return out |
Hi @kzndotsh is this issue still open, if yes then what is the requirement would like to contribute on this. |
Yes, it's still open. What do you mean by "requirement"? The issue is pretty wide open more as a discussion at the moment I suppose so I'm open to any direction/small changes or other issues can be made. |
Figure out how to optimize where possible at a lower level and explore areas for improvement
The text was updated successfully, but these errors were encountered: