On Sat, Jan 19, 2013 at 6:03 AM, Tobias Grosser <[email protected]> wrote: > This is a very performance critical point for auto completion. The manual > implementation gives a large speedup. As it does not complicate the code a > lot, > I figured it is worth the change. If anybody understands why the > CachedProperty > is here so much slower, I am very interested in working on an improvement of > CachedProperty.
It's possible that it has to do with the fact that the decorator causes at least one extra Python function call, which is one of the more expensive operations in CPython. The built-in `property` is coded in C (in python/Objects/descrobject.c). Unfortunately this scenario means that you probably won't be able to get equivalent performance from a pure-Python solution (in CPython) without doing something very nasty; pypy possibly won't have this problem. -- Sean Silva _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
