On 8/15/06, Neal Norwitz <nnorwitz at gmail.com> wrote: > I was playing around with a little patch to avoid that penalty. It > doesn't take any additional memory, just a handful of bits we aren't > using. :-) > > For the more common builtin types, it stores whether it's a subclass > in tp_flags, so there's no function call necessary and it's a constant > time operation. It was faster when doing simple stuff. Haven't > thought much whether this is really worthwhile or not. I like it! I wonder if you should use another bit for "inherits from BaseException". That would make catching and raising exceptions a bit faster. It applies cleanly to py3k -- perhaps you should just check it in there? +1 from me! -- --Guido van Rossum (home page: http://www.python.org/~guido/)
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