Package test :: Module pystone |
[hide private]
[frames] | no frames]

# Module pystone

source code

    "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.

Version: 1.1

Clases | [hide private]
| Record

Functions | [hide private]
main(loops=50000) | source code
pystones(loops=50000) | source code
Proc0(loops=50000) | source code
Proc1(PtrParIn) | source code
Proc2(IntParIO) | source code
Proc3(PtrParOut) | source code
Proc4() | source code
Proc5() | source code
Proc6(EnumParIn) | source code
Proc7(IntParI1, IntParI2) | source code
Proc8(Array1Par, Array2Par, IntParI1, IntParI2) | source code
Func1(CharPar1, CharPar2) | source code
Func2(StrParI1, StrParI2) | source code
Func3(EnumParIn) | source code

Variables | [hide private]
| LOOPS = `50000`
| Ident5 = `5`
| Ident4 = `4`
| Ident3 = `3`
| Ident2 = `2`
| Ident1 = `1`
| TRUE = `1`
| FALSE = `0`
| IntGlob = `0`
| BoolGlob = `0`
| Char1Glob = ``'``\x00``'``
| Char2Glob = ``'``\x00``'``
| Array1Glob = ``[`0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` `...``
| Array2Glob = ``[``[`0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,` 0`,``...``
| PtrGlb = `None`
| PtrGlbNext = `None`
| __package__ = ``'``test``'``

Variables Details | [hide private]

  ### Array1Glob Value:
      [0,
       0,
       0,
       0,
       0,
       0,
       0,
       0,
      ...

  ### Array2Glob Value:
      [[0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
      ...