Psyco alternative

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • king kikapu

    Psyco alternative

    Hi,

    it seems that Psyco's author will not port it for the upcoming Python
    3000 release :(
    So, for us who use it we will continue to use CPython 2.5.x version
    for some time to come. Is there an alternative to Psyco so i can have
    a look at ?

    Thanks in advance.
  • Paul Rubin

    #2
    Re: Psyco alternative

    king kikapu <aboudouvas@pan afonet.grwrites :
    it seems that Psyco's author will not port it for the upcoming Python
    3000 release :(
    I think the idea is it will be part of PyPy and you should use that.

    Comment

    • king kikapu

      #3
      Re: Psyco alternative

      On 27 Ìáñ, 14:35, Paul Rubin <http://phr...@NOSPAM.i nvalidwrote:
      king kikapu <aboudou...@pan afonet.grwrites :
      it seems that Psyco's author will not port it for the upcoming Python
      3000 release :(
      >
      I think the idea is it will be part of PyPy and you should use that.
      I know that his efforts are on PyPy now but i do not know when PyPy is
      going to be stable and if i can use it with my current "developmen t
      stack" (PyQt, Eric4 etc). I mean, i do not know if it will be possible
      to "abandon" CPYthon and use PyPy instead.

      Comment

      • Diez B. Roggisch

        #4
        Re: Psyco alternative

        king kikapu wrote:
        On 27 Μαρ, 14:35, Paul Rubin <http://phr...@NOSPAM.i nvalidwrote:
        >king kikapu <aboudou...@pan afonet.grwrites :
        it seems that Psyco's author will not port it for the upcoming Python
        3000 release :(
        >>
        >I think the idea is it will be part of PyPy and you should use that.
        >
        I know that his efforts are on PyPy now but i do not know when PyPy is
        going to be stable and if i can use it with my current "developmen t
        stack" (PyQt, Eric4 etc). I mean, i do not know if it will be possible
        to "abandon" CPYthon and use PyPy instead.
        Currently? No way. It's *way* to slow.

        Diez

        Comment

        • king kikapu

          #5
          Re: Psyco alternative

          On 27 Ìáñ, 15:56, "Diez B. Roggisch" <de...@nospam.w eb.dewrote:
          king kikapu wrote:
          On 27 Ìáñ, 14:35, Paul Rubin <http://phr...@NOSPAM.i nvalidwrote:
          king kikapu <aboudou...@pan afonet.grwrites :
          it seems that Psyco's author will not port it for the upcoming Python
          3000 release :(
          >
          I think the idea is it will be part of PyPy and you should use that.
          >
          I know that his efforts are on PyPy now but i do not know when PyPy is
          going to be stable and if i can use it with my current "developmen t
          stack" (PyQt, Eric4 etc). I mean, i do not know if it will be possible
          to "abandon" CPYthon and use PyPy instead.
          >
          Currently? No way. It's *way* to slow.
          >
          Diez
          Ok, i know this. The one that i do not know, is if, let'say, in 2
          years it will be ready for seriously development, PyPy will aim to
          "replace" CPython entirely ?? We are talking about an whole new
          distribution ?

          As for psyco, are there any alternatives to use now ?

          Comment

          • Stefan Behnel

            #6
            Re: Psyco alternative

            king kikapu wrote:
            >>As for psyco, are there any alternatives to use now ?
            >But ultimately, the author says that the approach is flawed, so at *some*
            >point it will be discontinued. But that could be said about nearly
            >everything, couldn't it?
            >>
            It is a pity because this module *does* really solve some problems...
            If it's about "some problems", then maybe Cython is an alternative.



            Stefan

            Comment

            • king kikapu

              #7
              Re: Psyco alternative

              If it's about "some problems", then maybe Cython is an alternative.Hmmm...thanks but i think Pyrex-like solution is not the ideal one.
              Coming from C# and having 8 years of expertise on it, i have gain a
              very positive thinking about jit compilers and i think that psyco (ok,
              a just-in-time specializer) is a more easy (and more correct) way to
              go that mixing 2 languages.

              Comment

              • bearophileHUGS@lycos.com

                #8
                Re: Psyco alternative

                Diez B. Roggisch:
                the author says that the approach is flawed, so at *some*
                point it will be discontinued.
                Can't Psyco be improved, so it can compile things like:

                nums = (i for i in xrange(200000) if i % 2)
                print sum(nums)

                I think the current Psyco runs slower than Python with generators/
                iterators. To speed up that code with Psyco you have to write this:

                nums = [i for i in xrange(200000) if i % 2]
                print sum(nums)

                Bye,
                bearophile

                Comment

                • Christian Tismer

                  #9
                  Re: Psyco alternative

                  bearophileHUGS@ lycos.com wrote:
                  Diez B. Roggisch:
                  >the author says that the approach is flawed, so at *some*
                  >point it will be discontinued.
                  >
                  Can't Psyco be improved, so it can compile things like:
                  >
                  nums = (i for i in xrange(200000) if i % 2)
                  print sum(nums)
                  Although my main goal is to support PyPy as much as possible,
                  I am currently taking a pause in favor of filling the gap
                  for psyco, supporting generators. The details are not yet
                  settled, maybe we choose to change the project name,
                  to avoid the author getting bugged with questions about
                  this extra stuff.

                  - chris

                  --
                  Christian Tismer :^) <mailto:tismer@ stackless.com>
                  tismerysoft GmbH : Have a break! Take a ride on Python's
                  Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/
                  14109 Berlin : PGP key -http://wwwkeys.pgp.net/
                  work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05
                  PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
                  whom do you want to sponsor today? http://www.stackless.com/

                  Comment

                  • sturlamolden

                    #10
                    Re: Psyco alternative

                    On Mar 27, 4:02 pm, king kikapu <aboudou...@pan afonet.grwrote:
                    As for psyco, are there any alternatives to use now ?

                    When Cython has implemented all of Python's syntax, we can replace
                    CPython's compiler and bytecode interpreter with Cython and a C
                    compiler. Cython can be one or two orders of magnitude faster than
                    CPython.


                    Comment

                    • sturlamolden

                      #11
                      Re: Psyco alternative

                      On Mar 27, 5:01 pm, king kikapu <aboudou...@pan afonet.grwrote:
                      Hmmm...thanks but i think Pyrex-like solution is not the ideal one.
                      Coming from C# and having 8 years of expertise on it, i have gain a
                      very positive thinking about jit compilers and i think that psyco (ok,
                      a just-in-time specializer) is a more easy (and more correct) way to
                      go that mixing 2 languages.





                      Comment

                      • sturlamolden

                        #12
                        Re: Psyco alternative

                        On Mar 27, 5:01 pm, king kikapu <aboudou...@pan afonet.grwrote:
                        Hmmm...thanks but i think Pyrex-like solution is not the ideal one.
                        Coming from C# and having 8 years of expertise on it, i have gain a
                        very positive thinking about jit compilers and i think that psyco (ok,
                        a just-in-time specializer) is a more easy (and more correct) way to
                        go that mixing 2 languages.

                        The problem with Python, when we are talking out jit compilation, is
                        it's reliance on attribute lookups in hash tables. Java and C# do not
                        have dynamically bound attributes, and can implement classes using
                        vtables. Attributes cannot be rebound in Java or C#. A Python jit
                        cannot even do elementary optimizations like keeping an integer in a
                        register. This makes it a lot easier to make an efficient jit compiler
                        for Java or C#. Python is more like Common Lisp. There is no efficient
                        jit for Lisp. But there are very fast implementations that depend on
                        optional static typing (e.g. SBCL and CMUCL). That could be an option
                        of Python as well, by including something like Cython and a C
                        compiler. Any module that has a cdef is passed to Cython and CC
                        instead of the usual bytecode compiler and interpreter.


                        Comment

                        • sturlamolden

                          #13
                          Re: Psyco alternative

                          On Mar 28, 8:06 pm, Paul Boddie <p...@boddie.or g.ukwrote:
                          From what I've seen from browsing publicly accessible materials,
                          there's a certain commercial interest in seeing Psyco updated
                          somewhat.
                          YouTube uses Psyco.



                          Comment

                          Working...