Another week's gone. One benchmark (b1.py) is running with Parrot. The code is produced by languages/python/pie-thon.pl. The speed is competitive :)

More below.

leo
The Pie-thon state - 4

# date [- range ] title
#   description

10.07.2004 Pie-thon 45 - 47

        Enhanced complex functionality. More tests.
        First handling of Python attributes.

           Pie-thon 48

        Unified Parrot PMC singleton objects (Env used a different
        scheme) A singleton is also its own class now.

           Pie-thon 49

        Array is_equal() code and get_string() for repr()

11.07.2004

        A day for nothing. Tried to rewrite pie-thon.pl (the Bytecode
        translator) in an OO fashion. Decided that it would take too
        long and stopped that. Alas Dan should have done it weeks ago.

12.07.2004 Pie-thon 50

        Implement lambda subs in pie-thon.pl. Parrot runs:

          print filter(lambda x: x < 5, range(10)) == range(5)

           Pie-thon 51

         Implement Python's float() function. Parrot used to have its
         own string to number conversion which was inexact. Now atof()
         is used (which needs fixing for C99 compilers that might
         interpret "0x23" as hex.

           Pie-thon 52 - 58

         Implement a sort() hook in Parrot - using qsort() for now.
         Better vararg handling using argcP (the argument count).
         Implement lower(), upper(), titlecase() in Parrot (ASCII
         only).
         Python's int() working. Improve sort() speed.


           Pie-thon 59

         Reworked Parrots objects instantiation the Python way:

          $P0 = global "Py_int"    # aka "int"
          $P1 = $P0()              # a new int (value 0)
          $P2 = $P0(42)            # a new int (value 42)

         That allows also isa() to work.

           Python 60 - 63

         Convert almost all Python objects to that new scheme

14.07.2004 Python 64 - 66

         Some experiments with objects.

           class C(int):
              pass
           def main():
              i = C(42)

          works now, giving a new C object with integer value 42.

14.07.2004 *Dan's already starting with the Bytecode converter - SNCR*

15.07.2004 Pie-thon 67 - buffered IO

         Parrot bufferd IO was severly broken - i.e. non-existent.
         Fixing that boosts printing 1000 digits of PI from around
         the speed of Python to *four* times that speed - wheee.
         A smaller (~15%) improvement in BigInt multiply was involved
         too.

           Pie-thon 68 - xrange

         Implemented xrange object

           Pie-thon 69 - b1.py is running

         The very first benchmark b1.py is running, translated by
         pie-thon.pl.
         It spends tons of seconds in DOD. (The darned test creates
         highly self-referential and deeply nested array structures).

         Reduced DOD count from several hundreds down to 28. Still
         slow. Optimizing code generation brings DOD count down to 12.
         Still slow.

16.07.2004 Pie-thon 70 - 72

         Analyzing b1.pir code with cachegrind revealed massive L2
         data cache misses caused by 12 DOD runs. By reducing the
         number of DODs to half and by optimizations in the DOD code
         the cache misses are now down to one third of the original
         number.
         Also enabled (and fixed) now an enhancement to the JIT
         run core called JIT/CGP. Instead of calling the function
         versions of non-JITted code, this jumps directly into the
         CGP (direct threaded) run-core, if possible. This save some
         function call overhead.

         b1.pir runs here faster then with Python now.

TODO
 * finish bigint
 * finish complex PMC class
 * finish exception class hierarchy
 * tons more

# vim: sw=4 tw=70:

Reply via email to