Which of these is most efficient in terms of performance, in Python: a module with only functions, a module with a single class and that class having only staticmethods, and a module with a single class having non static methods?
-
Ex: Say you are writing a wrapper for python memcached, which of the above three is usually preferred in terms of maintenance and performance
-
Answer:
Calling each type of function has the exact same cost. There is no speed difference that can be realized from one of these. Write your code to be usable.
Alex Gaynor at Quora Visit the source
Related Q & A:
- Is it legal for a car dealership to charge a salesperson for a customer's bounced check?Best solution by Yahoo! Answers
- How to forward e-mail to a group from a single e-mail address?Best solution by Webmasters
- Can you use a wire dog crate (like a Midwest) on a Via Rail train?Best solution by Yahoo! Answers
- Where can I find a small end 4 pin fire wire and a 5 pin mini usb 2.0 cable that connects a external harddrive?Best solution by Yahoo! Answers
- Can a person have more than two alleles for a single gene?Best solution by answers.yahoo.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.