jeudi 30 juin 2016

Performance hit from if: pass statements

I am writing a script that parses user input, reads a file, does some work, and then sends an html POST request.

There is one section of the code that requires me to do a different action based on the interaction of three variables, but some of the cases are handled with 'do nothing' i.e. pass. Initially, I included all of the pass conditional paths to help with maintainability for the other employees that are not as familiar with this script/Python.

So with this information, my question is:

Will there be any kind of performance speedup if I remove these pass paths? These statements are not in a module that will be imported anywhere else, it will be run from the command line.

Aucun commentaire:

Enregistrer un commentaire