Below is the last summary of the attempt to implement enough of Python to run the Pie-thon benchmarks - within 5 weeks. Four and a half of seven programs are running.

Albeit this experiment did fail, it IMHO has brought Parrot a lot further. Valuable interals like integer->bigint promotion are vastly implemented.

We'll have to sort out, what we will keep in core and what should be moved into a Python or maybe a general HLL support library.

But before starting over, we will have to go through some of the issues that arise, when HLL borders are crossed. E.g.:

  PyString + PMC  := concat
  PyString % PMC  := sprintf

And there is of course the question, if we should really be "bug"-compatible

>>> False=42
>>> if False:
...     print "aha", False
aha 42

Have fun, leo
The Pie-thon state - 5

17.07.2004 Pie-thon 73 - 76

        Iterators generators, slices cleanup. Implement SET_SLICE
        and DEL_SLICE.

17.07.2004 Pie-thon 77 vtable cleanup, floor_divide

        Removed tons of unused vtables concerning BIGNUM. All these
        vtable entries assumed that BIGNUM is a native Parrot type,
        which it isn't. BIGNUMs a PMCs.
        Create a new floor_divide MMD entry.

19.07.2004 Pie-thon 78 -

        Adapt perlhash.fromkeys() to new slice creation scheme. is running - fast.

19.07.2004 Pie-thon 79

        Better var arg handling of foo(*arg).

19.07.2004 Pie-thon 80

        parrot/ run this piece from

        def izip(*args):
            args = map(iter, args)
            while 1:
                yield tuple([ for x in args])

        def main():
            for x, y in izip(xrange(10), "abcdefghijklmnop"):
                print y,

        if __name__ == '__main__':

20.07.2004 Pie-thon 81 - 82

        Towards objects and attributes. Hack to do
        something for ooops[1].

21.07.2004 Pie-thon 83 - 85

        More object bits. Get generator method in object running.

22.07.2004 Pie-thon 86

        Fixed a bug in Parrot exception code. After reentering the
        runloop 3 times, nested exceptions caused a SEGFAULT.

22.07.2004 Pie-thon 87 runs. And as promised it runs fast. More then double the
        speed of Python - with an unoptimized Parrot build ;)

22.07.2004 Pie-thon 88 - 90

        Approaching unary_negative in Fix various
        ResizablePMCArray bugs. Implement the __new__ aka "CONSTRUCT"
        functionality, which creates an object for a given class and

23.07.2004 Pie-thon 91 - 92

        Provide a builtin __new__ as default fallback. Parrot got
        trace output for method call resolution.

           Pie-thon 93

        Parrot's native type vtable functions and Python's everything
        is a PMC objects are fighting, if a vtable function like
        "__get_string" is overridden. The vtable wants a native type
        like STRING* while the external function delivers a PMC.
        Parrot now extracts the native type it needs from the PMC, if
        the return value signature of the function indicates a PMC.

23.07.2004 Pie-thon 94 - 95 is running. It reveals a DOD bug though, so GC is

This concludes the effort to implement the Pie-thon benchmark for
OSCON, because there isn't any chance to implement the needed bits for in the remaining time.

Four of seven benchmarks are running: b1, b2, b3, and b6. b5 is done
partially. Three of these are faster on Parrot, but e.g. while
is running 3 times the speed of python, it takes just 0.2s here on a
Pentium 600, which makes it hard to say, what's faster for these test

The benchmarks are mainly testing the speed of builtin functions,
which are of course mature and optimized in Python, while a lot of the
builtins just didn't even exist in Parrot a month ago. When it comes
to just running arithmetic code, like in, Parrot is a lot

I'd estimate that Parrot will run at about twice the speed of Python
or Perl5 on average, finally.

[1] ooops: object oriented obfuscation - pythonic sense

Reply via email to