>>>>> "KB" == Kevin Butler <kbutler@campuspipeline.com> writes: KB> [Jeremy] >> Why do you need **kwargs at all? KB> So we can postpone formatting the optional arguments into a KB> message until after we test if we're going to log the message or KB> not. Aha! I must have gone out of my way to miss this. This is certainly a good thing. In the case of the ZEO server, we put all the trace and debug level logging calls inside "if __debug__:" We see a 20% speedup on compute intensive benchmarks when running with -O. So avoiding the string formatting is a nice savings. On the other hand, extended calls -- where the caller passes *args or **args -- are a lot slower than regular calls. It would be interesting to benchmark both approaches. I expect that no-formatting is faster, but wouldn't bet too much on it. Apps probably still benefit from exploting if __debug__. Jeremy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4