Module Expr Str ImportFrom alias ImportFrom alias Assign NameStore Num Assign NameStore Str Assign ListStore NameStore NameStore NameStore NameStore NameStore Call NameLoad Num Num ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num Num Num Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam defaults NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Expr Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Return Call NameLoad NameLoad decorator_list Assign NameStore Num Assign NameStore NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore BinOpMult ListLoad Num Num Assign NameStore ListComp SubscriptLoad NameLoad Slice comprehension NameStore BinOpMult ListLoad NameLoad Num Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults NameLoad body Global identifier Global identifier Global identifier Global identifier Global identifier Global identifier Global identifier Global identifier Assign NameStore Call NameLoad For NameStore Call NameLoad NameLoad body Pass Assign NameStore BinOpSub Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Str Assign NameStore Str Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Num Num Assign NameStore Call NameLoad For NameStore Call NameLoad NameLoad body Expr Call NameLoad Expr Call NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Str Assign NameStore NameLoad Assign NameStore UnaryOpNot Call NameLoad NameLoad NameLoad While CompareLt NameLoad NameLoad body Assign NameStore BinOpSub BinOpMult Num NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Num Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Str While CompareLtE NameLoad NameLoad body If CompareEq NameLoad Call NameLoad NameLoad Str body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad BinOpAdd Call NameLoad NameLoad Num Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpDiv NameLoad NameLoad Assign NameStore BinOpSub BinOpMult Num BinOpSub NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpSub BinOpSub Call NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Assign NameStore Num orelse Assign NameStore BinOpDiv NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num orelse Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpAdd NameLoad Num While Num body If CompareEq NameLoad Str body Assign NameStore BinOpSub NameLoad Num Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore NameLoad If CompareEq NameLoad NameLoad body Break Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Global identifier If CompareIsNot NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore Num Assign AttributeStore NameLoad attr Call NameLoad Num NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Global identifier Assign NameStore CompareEq NameLoad Str Assign NameStore BoolOpOr NameLoad NameLoad Assign NameStore Str decorator_list FunctionDef arguments args defaults body Global identifier Global identifier Assign NameStore Str Assign NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore NameLoad If UnaryOpNot Call NameLoad NameLoad body Assign NameStore NameLoad If CompareEq NameLoad NameLoad body Assign NameStore NameLoad orelse If CompareEq NameLoad NameLoad body If CompareGt NameLoad Num body Assign NameStore NameLoad orelse Assign NameStore NameLoad orelse If CompareEq NameLoad NameLoad body Assign NameStore NameLoad orelse If CompareEq NameLoad NameLoad body Pass orelse If CompareEq NameLoad NameLoad body Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpAdd NameLoad Num Assign NameStore BinOpAdd NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Global identifier Assign NameStore BinOpAdd NameLoad Num Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index BinOpAdd NameLoad Num SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index BinOpAdd NameLoad Num NameLoad For NameStore Call NameLoad NameLoad BinOpAdd NameLoad Num body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index BinOpSub NameLoad Num BinOpAdd SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index BinOpSub NameLoad Num Num Assign SubscriptStore SubscriptLoad NameLoad Index BinOpAdd NameLoad Num Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore NameLoad Assign NameStore NameLoad If CompareNotEq NameLoad NameLoad body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Num While CompareLtE NameLoad Num body If CompareEq Call NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad Num NameLoad body Assign NameStore Str Assign NameStore BinOpAdd NameLoad Num If BoolOpAnd CompareGtE NameLoad Str CompareLtE NameLoad Str body Assign NameStore Num If CompareEq NameLoad Str body Return NameLoad orelse If CompareGt NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad Num Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore NameLoad If CompareEq NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list If CompareEq NameLoad Str body Import alias FunctionDef arguments args NameParam defaults body Expr Call NameLoad NameLoad keyword Str keyword AttributeLoad NameLoad attr Expr Call NameLoad BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num decorator_list Assign NameStore BinOpSub Call NameLoad AttributeLoad NameLoad attr Num If CompareGt NameLoad Num body Expr Call NameLoad BinOpMod Str NameLoad orelse If CompareEq NameLoad Num body TryExcept body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num handlers ExceptHandler type NameLoad body Expr Call NameLoad BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num orelse Assign NameStore NameLoad Expr Call NameLoad NameLoad
N/A N/A 
"PYSTONE" Benchmark Program

Version:        Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes)

Author:         Reinhold P. Weicker,  CACM Vol 27, No 10, 10/84 pg. 1013.

                Translated from ADA to C by Rick Richardson.
                Every method to preserve ADA-likeness has been used,
                at the expense of C-ness.

                Translated from C to Python by Guido van Rossum.

Version History:

                Version 1.1 corrects two bugs in version 1.0:

                First, it leaked memory: in Proc1(), NextRecord ends
                up having a pointer to itself.  I have corrected this
                by zapping NextRecord.PtrComp at the end of Proc1().

                Second, Proc3() used the operator != to compare a
                record to None.  This is rather inefficient and not
                true to the intention of the original benchmark (where
                a pointer comparison to None is intended; the !=
                operator attempts to find a method __cmp__ to do value
                comparison of the record).  Version 1.1 runs 5-10
                percent faster than version 1.0, so benchmark figures
                of different versions can't be compared directly.

 __future__ print_function time clock N/A LOOPS 50000 N/A __version__ 1.1 N/A N/A Ident1 Ident2 Ident3 Ident4 Ident5 N/A range 1 6 Record N/A object N/A __init__ N/A N/A self PtrComp Discr EnumComp IntComp StringComp N/A None 0 0 0 0 N/A N/A N/A self PtrComp PtrComp N/A N/A self Discr Discr N/A N/A self EnumComp EnumComp N/A N/A self IntComp IntComp N/A N/A self StringComp StringComp N/A copy N/A N/A self N/A N/A N/A N/A Record N/A self PtrComp N/A self Discr N/A self EnumComp N/A self IntComp N/A self StringComp N/A N/A N/A TRUE 1 N/A FALSE 0 main N/A N/A loops N/A LOOPS N/A N/A N/A benchtime stones N/A pystones loops N/A N/A print N/A Pystone(%s) time for %d passes = %g N/A __version__ loops benchtime N/A N/A print N/A This machine benchmarks at %g pystones/second stones N/A pystones N/A N/A loops N/A LOOPS N/A N/A N/A Proc0 loops N/A N/A IntGlob 0 N/A BoolGlob FALSE N/A Char1Glob N/A Char2Glob N/A Array1Glob N/A N/A 0 51 N/A Array2Glob N/A N/A x N/A N/A x N/A N/A Array1Glob 51 N/A PtrGlb None N/A PtrGlbNext None Proc0 N/A N/A loops N/A LOOPS N/A N/A IntGlob N/A BoolGlob N/A Char1Glob N/A Char2Glob N/A Array1Glob N/A Array2Glob N/A PtrGlb N/A PtrGlbNext N/A starttime N/A clock N/A i N/A range loops N/A N/A N/A nulltime N/A N/A clock starttime N/A PtrGlbNext N/A Record N/A PtrGlb N/A Record N/A N/A PtrGlb PtrComp PtrGlbNext N/A N/A PtrGlb Discr Ident1 N/A N/A PtrGlb EnumComp Ident3 N/A N/A PtrGlb IntComp 40 N/A N/A PtrGlb StringComp DHRYSTONE PROGRAM, SOME STRING N/A String1Loc DHRYSTONE PROGRAM, 1'ST STRING N/A N/A N/A Array2Glob N/A 8 N/A 7 10 N/A starttime N/A clock N/A i N/A range loops N/A N/A N/A Proc5 N/A N/A Proc4 N/A IntLoc1 2 N/A IntLoc2 3 N/A String2Loc DHRYSTONE PROGRAM, 2'ND STRING N/A EnumLoc Ident2 N/A BoolGlob N/A N/A Func2 String1Loc String2Loc N/A N/A IntLoc1 IntLoc2 N/A N/A IntLoc3 N/A N/A 5 IntLoc1 IntLoc2 N/A IntLoc3 N/A Proc7 IntLoc1 IntLoc2 N/A IntLoc1 N/A IntLoc1 1 N/A N/A Proc8 Array1Glob Array2Glob IntLoc1 IntLoc3 N/A PtrGlb N/A Proc1 PtrGlb N/A CharIndex A N/A N/A CharIndex Char2Glob N/A N/A N/A EnumLoc N/A Func1 CharIndex C N/A N/A EnumLoc N/A Proc6 Ident1 N/A CharIndex N/A chr N/A N/A ord CharIndex 1 N/A IntLoc3 N/A IntLoc2 IntLoc1 N/A IntLoc2 N/A IntLoc3 IntLoc1 N/A IntLoc2 N/A N/A 7 N/A IntLoc3 IntLoc2 IntLoc1 N/A IntLoc1 N/A Proc2 IntLoc1 N/A benchtime N/A N/A N/A clock starttime nulltime N/A N/A benchtime 0.0 N/A N/A loopsPerBenchtime 0.0 N/A N/A loopsPerBenchtime N/A loops benchtime N/A N/A benchtime loopsPerBenchtime N/A Proc1 N/A N/A PtrParIn N/A N/A N/A N/A PtrParIn PtrComp NextRecord N/A N/A PtrGlb copy N/A N/A PtrParIn IntComp 5 N/A N/A NextRecord IntComp N/A PtrParIn IntComp N/A N/A NextRecord PtrComp N/A PtrParIn PtrComp N/A N/A NextRecord PtrComp N/A Proc3 N/A NextRecord PtrComp N/A N/A N/A NextRecord Discr Ident1 N/A N/A N/A NextRecord IntComp 6 N/A N/A NextRecord EnumComp N/A Proc6 N/A PtrParIn EnumComp N/A N/A NextRecord PtrComp N/A PtrGlb PtrComp N/A N/A NextRecord IntComp N/A Proc7 N/A NextRecord IntComp 10 N/A N/A PtrParIn N/A N/A NextRecord copy N/A N/A NextRecord PtrComp None N/A PtrParIn N/A Proc2 N/A N/A IntParIO N/A N/A N/A IntLoc N/A IntParIO 10 N/A 1 N/A N/A N/A Char1Glob A N/A N/A IntLoc N/A IntLoc 1 N/A IntParIO N/A IntLoc IntGlob N/A EnumLoc Ident1 N/A N/A EnumLoc Ident1 N/A N/A N/A IntParIO N/A Proc3 N/A N/A PtrParOut N/A N/A N/A IntGlob N/A N/A PtrGlb None N/A N/A PtrParOut N/A PtrGlb PtrComp N/A N/A IntGlob 100 N/A N/A PtrGlb IntComp N/A Proc7 10 IntGlob N/A PtrParOut N/A Proc4 N/A N/A N/A N/A N/A Char2Glob N/A BoolLoc N/A Char1Glob A N/A BoolLoc N/A BoolLoc BoolGlob N/A Char2Glob B N/A Proc5 N/A N/A N/A N/A N/A Char1Glob N/A BoolGlob N/A Char1Glob A N/A BoolGlob FALSE N/A Proc6 N/A N/A EnumParIn N/A N/A N/A EnumParOut EnumParIn N/A N/A N/A Func3 EnumParIn N/A N/A EnumParOut Ident4 N/A N/A EnumParIn Ident1 N/A N/A EnumParOut Ident1 N/A N/A N/A EnumParIn Ident2 N/A N/A N/A IntGlob 100 N/A N/A EnumParOut Ident1 N/A N/A EnumParOut Ident4 N/A N/A N/A EnumParIn Ident3 N/A N/A EnumParOut Ident2 N/A N/A N/A EnumParIn Ident4 N/A N/A N/A N/A N/A EnumParIn Ident5 N/A N/A EnumParOut Ident3 N/A EnumParOut N/A Proc7 N/A N/A IntParI1 IntParI2 N/A N/A N/A IntLoc N/A IntParI1 2 N/A IntParOut N/A IntParI2 IntLoc N/A IntParOut N/A Proc8 N/A N/A Array1Par Array2Par IntParI1 IntParI2 N/A N/A N/A IntGlob N/A IntLoc N/A IntParI1 5 N/A N/A Array1Par N/A IntLoc IntParI2 N/A N/A Array1Par N/A N/A IntLoc 1 N/A Array1Par N/A IntLoc N/A N/A Array1Par N/A N/A IntLoc 30 IntLoc N/A IntIndex N/A range IntLoc N/A IntLoc 2 N/A N/A N/A N/A Array2Par N/A IntLoc N/A IntIndex IntLoc N/A N/A N/A Array2Par N/A IntLoc N/A N/A IntLoc 1 N/A N/A N/A Array2Par N/A IntLoc N/A N/A IntLoc 1 1 N/A N/A N/A Array2Par N/A N/A IntLoc 20 N/A IntLoc N/A Array1Par N/A IntLoc N/A IntGlob 5 N/A Func1 N/A N/A CharPar1 CharPar2 N/A N/A N/A CharLoc1 CharPar1 N/A CharLoc2 CharLoc1 N/A N/A CharLoc2 CharPar2 N/A N/A Ident1 N/A N/A Ident2 N/A Func2 N/A N/A StrParI1 StrParI2 N/A N/A N/A IntLoc 1 N/A N/A IntLoc 1 N/A N/A N/A N/A Func1 N/A StrParI1 N/A IntLoc N/A StrParI2 N/A N/A IntLoc 1 Ident1 N/A N/A CharLoc A N/A IntLoc N/A IntLoc 1 N/A N/A N/A CharLoc W N/A CharLoc Z N/A N/A IntLoc 7 N/A N/A CharLoc X N/A N/A TRUE N/A N/A N/A StrParI1 StrParI2 N/A N/A IntLoc N/A IntLoc 7 N/A TRUE N/A N/A FALSE N/A Func3 N/A N/A EnumParIn N/A N/A N/A EnumLoc EnumParIn N/A N/A EnumLoc Ident3 N/A N/A TRUE N/A FALSE N/A N/A N/A __name__ __main__ N/A N/A sys error N/A N/A msg N/A N/A N/A N/A print msg end file N/A sys stderr N/A N/A print N/A usage: %s [number_of_loops] N/A N/A sys argv N/A 0 file N/A sys stderr N/A N/A N/A sys exit 100 N/A N/A nargs N/A N/A len N/A sys argv 1 N/A N/A nargs 1 N/A N/A N/A error N/A %d arguments are too many; nargs N/A N/A N/A nargs 1 N/A N/A N/A N/A loops N/A int N/A N/A sys argv N/A 1 N/A N/A N/A ValueError N/A N/A N/A error N/A Invalid argument %r; N/A N/A sys argv N/A 1 N/A N/A loops LOOPS N/A N/A main loops