Anyone interested in making pystone use a new-style class? I just tried it and it slowed pystone down by 12%. Using __slots__ bought back 5%. On the one hand, we end up comparing the new-style class implementation of one Python with the classic class version of older Pythons. On the other hand, we seems to think that new-style classes are preferred. I think we ought to measure them. Jeremy Index: pystone.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/pystone.py,v retrieving revision 1.7 diff -c -c -r1.7 pystone.py *** pystone.py 6 Aug 2002 17:21:20 -0000 1.7 --- pystone.py 16 Aug 2002 18:49:56 -0000 *************** *** 40,46 **** [Ident1, Ident2, Ident3, Ident4, Ident5] = range(1, 6) ! class Record: def __init__(self, PtrComp = None, Discr = 0, EnumComp = 0, IntComp = 0, StringComp = 0): --- 40,46 ---- [Ident1, Ident2, Ident3, Ident4, Ident5] = range(1, 6) ! class Record(object): def __init__(self, PtrComp = None, Discr = 0, EnumComp = 0, IntComp = 0, StringComp = 0):
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