[pypy-dev] pypy-dev Digest, Vol 26, Issue 5
cuitao
wdct at msn.com
Wed Jun 5 06:32:39 CEST 2013
hello, can you consider adding the blist support in pypy ?
blist: a list-like type with better asymptotic performance and similar performance on small lists
> From: pypy-dev-request at python.org
> Subject: pypy-dev Digest, Vol 26, Issue 5
> To: pypy-dev at python.org
> Date: Tue, 4 Jun 2013 12:00:02 +0200
>
> Send pypy-dev mailing list submissions to
> pypy-dev at python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mail.python.org/mailman/listinfo/pypy-dev
> or, via email, send a message with subject or body 'help' to
> pypy-dev-request at python.org
>
> You can reach the person managing the list at
> pypy-dev-owner at python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of pypy-dev digest..."
>
>
> Today's Topics:
>
> 1. JIT slowdown on creating types (Vasily Evseenko)
> 2. Best FFI interface (Timothy Baldridge)
> 3. Re: Best FFI interface (Armin Rigo)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 03 Jun 2013 14:08:57 +0400
> From: Vasily Evseenko <svpcom at gmail.com>
> To: PyPy Developer Mailing List <pypy-dev at python.org>
> Subject: [pypy-dev] JIT slowdown on creating types
> Message-ID: <51AC6B39.3060703 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> When i dynamically create new type (for example classes nested to
> functions) I've got linear code slowdown:
>
> -----
> def test():
> obj = type('foo' , (object,), {'attr1': 0})()
>
> for i in xrange(1000000):
> obj.attr1 += 1
>
>
> for j in xrange(100):
> ts = time.time()
> test()
> print time.time() - ts
> ------
> # pypy ./test.py
> 0.0529999732971
> 0.0519850254059
> 0.0545370578766
> 0.0622198581696
> ...
> 0.678023099899
> 0.686202049255
> 0.68180680275
> 0.703506946564
>
> [PyPy 2.0.2 with GCC 4.4.5] on linux2
>
> Is it bug or a feature?
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 3 Jun 2013 12:55:20 -0600
> From: Timothy Baldridge <tbaldridge at gmail.com>
> To: PyPy Developer Mailing List <pypy-dev at python.org>
> Subject: [pypy-dev] Best FFI interface
> Message-ID:
> <CAL36E+sKEFAugw9FJZE-9A+aHsm5fj-p6GNPpvYmx=Grgb2QRg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I'm attempting to integrate my rpython interpreter with libgmp, and I'm a
> bit confused in how to call the library from my rpython code. it seems we
> have three ways?
>
> rlib.libffi (deprecated?)
> rlib.jit_libffi
> rlib.clibffi
>
> Which of these is prefered for a from-scratch rpython interpreter? In
> addition, I've looked at the code for each of these and it's not terribly
> clear how to go about something like this (in psudeocode):
>
> mpz = malloc(sizeof(size_t) * 3)
> __gmpz_init_set_si(mpz, (signed long)val)
>
> the struct passed around in mpz can be opaque to the interpreter as it will
> only ever be access via gmp functions.
>
> Thanks for the help,
>
> Timothy Baldridge
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130603/1f7dd168/attachment-0001.html>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 3 Jun 2013 22:11:03 +0200
> From: Armin Rigo <arigo at tunes.org>
> To: Timothy Baldridge <tbaldridge at gmail.com>
> Cc: PyPy Developer Mailing List <pypy-dev at python.org>
> Subject: Re: [pypy-dev] Best FFI interface
> Message-ID:
> <CAMSv6X2gGLdq-odOfk-CtsGVqp04mpf1PwdDrmQwaq8hA5hHTA at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Timothy,
>
> On Mon, Jun 3, 2013 at 8:55 PM, Timothy Baldridge <tbaldridge at gmail.com> wrote:
> > I'm attempting to integrate my rpython interpreter with libgmp, and I'm a
> > bit confused in how to call the library from my rpython code. it seems we
> > have three ways?
> >
> > rlib.libffi (deprecated?)
> > rlib.jit_libffi
> > rlib.clibffi
>
> You're looking at the wrong place. You should instead look at
> rpython.rtyper.lltypesystem.rffi, which is minimally documented in
> pypy/doc/rffi.rst. What you list above are ways to invoke libffi,
> which is a C library to do dynamic calls. (Additionally, if the goal
> is only to have ints of unlimited size in RPython, there is
> rpython.rlib.rbigint.)
>
>
> A bient?t,
>
> Armin.
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> http://mail.python.org/mailman/listinfo/pypy-dev
>
>
> ------------------------------
>
> End of pypy-dev Digest, Vol 26, Issue 5
> ***************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130605/a2d7c5d0/attachment.html>
More information about the pypy-dev
mailing list