Re: [pypy-dev] Global executable naming policy

2012-02-17 Thread Dirkjan Ochtman
On Fri, Feb 17, 2012 at 03:41, Aaron DeVore wrote: > There currently isn't an official naming scheme for the PyPy > executable for system installations. Of the 3 setups I've seen, the > official build uses pypy, Arch Linux uses pypy, and Gentoo Linux uses > pypy-c. FWIW, if people feel it should

Re: [pypy-dev] Global executable naming policy

2012-02-17 Thread Maciej Fijalkowski
On Fri, Feb 17, 2012 at 10:43 AM, Dirkjan Ochtman wrote: > On Fri, Feb 17, 2012 at 03:41, Aaron DeVore wrote: >> There currently isn't an official naming scheme for the PyPy >> executable for system installations. Of the 3 setups I've seen, the >> official build uses pypy, Arch Linux uses pypy, a

[pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Timothy Baldridge
Last night, I was finally able to get enough of core.clj implemented to run a basic factorial program in clojure-py (https://github.com/halgari/clojure-py). In this project we use byteplay to generate bytecode for clojure routines, and run the entire language off the python vm. In general, I've bee

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Antonio Cuni
Hello Timothy, On 02/17/2012 02:03 PM, Timothy Baldridge wrote: clojure.examples.factorial=> (dis.dis *) 0 0 LOAD_FAST0 (__argsv__) 3 LOAD_ATTR0 (__len__) 6 CALL_FUNCTION0 I didn't look in depth at the byt

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Antonio Cuni
On 02/17/2012 02:27 PM, Timothy Baldridge wrote: In pypy we have a custom opcode to call methods, which is much faster than LOAD_ATTR/CALL_FUNCTION. See e.g. how this piece of code gets compiled: Excellent! I was unaware of this. Just last night I started abstracting some bytecode generation t

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Maciej Fijalkowski
On Fri, Feb 17, 2012 at 3:29 PM, Antonio Cuni wrote: > On 02/17/2012 02:27 PM, Timothy Baldridge wrote: >>> >>> In pypy we have a custom opcode to call methods, which is much faster >>> than >>> LOAD_ATTR/CALL_FUNCTION. See e.g. how this piece of code gets compiled: >>> >> >> Excellent! I was unaw

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Timothy Baldridge
> First question - why did you choose to implement this as a compiler to > python bytecode? It does sound like an interpreter written in rpython > would have both a much better performance and a much easier > implementation (compiler vs interpreter). A few reasons for this. Mostly I didn't want to

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Timothy Baldridge
Oh yeah, I forgot. The other nice thing about doing clojure-py in Python is that I should be able to write RPython code in Clojure. Lisp macros FTW! Timothy -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of the

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Antoni Segura Puimedon
Hi Timothy, I'm new in the list and I was very recently planning to do a pet project in implementing a clojure interpreter in Rpython. Of course, I share the same concerns as you about the standard library issue (although your body of work on the issue gives you a much better understanding of all

Re: [pypy-dev] question re: ancient SSL requirement of pypy

2012-02-17 Thread Leonardo Santagada
On Tue, Feb 14, 2012 at 7:45 AM, Maciej Fijalkowski wrote: > It's not PyPy requirement, it's the binary requirement. To be honest, > binary distribution on linux is a major mess. Fortunately for most > popular distributions there is a better or worse source of official or > semi-official way to ge

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Timothy Baldridge
> A more generally targeted question, besides the sample rpython tutorial for > brainfuck, what are the recommended readings (parts of the pypy code, > papers, etc), tools and/or magic for working at rpython on an interpreter? Now, most of this code is more or less crap, but I do suggest taking a

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Maciej Fijalkowski
On Fri, Feb 17, 2012 at 5:11 PM, Timothy Baldridge wrote: >> A more generally targeted question, besides the sample rpython tutorial for >> brainfuck, what are the recommended readings (parts of the pypy code, >> papers, etc), tools and/or magic for working at rpython on an interpreter? > > > Now,

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Antoni Segura Puimedon
On Fri, Feb 17, 2012 at 4:11 PM, Timothy Baldridge wrote: > > A more generally targeted question, besides the sample rpython tutorial > for > > brainfuck, what are the recommended readings (parts of the pypy code, > > papers, etc), tools and/or magic for working at rpython on an > interpreter? > >

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Amaury Forgeot d'Arc
2012/2/17 Timothy Baldridge > Basically I got to the point where I realized that if I had lisp > macros, I could write RPython code way faster. Half of the structures > in Clojure follow this pattern: > > class Foo(object): >def __init__(self, foo bar, baz): > self.foo = foo >

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Maciej Fijalkowski
On Fri, Feb 17, 2012 at 5:23 PM, Maciej Fijalkowski wrote: > On Fri, Feb 17, 2012 at 5:11 PM, Timothy Baldridge > wrote: >>> A more generally targeted question, besides the sample rpython tutorial for >>> brainfuck, what are the recommended readings (parts of the pypy code, >>> papers, etc), too

Re: [pypy-dev] question re: ancient SSL requirement of pypy

2012-02-17 Thread Armin Rigo
Hi Leonardo, On Fri, Feb 17, 2012 at 15:55, Leonardo Santagada wrote: > why not statically link everything and mark the pre built binaries a > "security risk" or whatever and then they will just work. Anyone can either install PyPy from his own distribution, or translate it from sources; or atte

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Armin Rigo
Hi Timothy, On Fri, Feb 17, 2012 at 14:03, Timothy Baldridge wrote: > In general, I've been very impressed with > the performance of pypy, but this factorial program takes about 2x > longer to complete than the same routine running on CPython. It's factorial(), so it's handling large "longs". S

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Armin Rigo
Hi Anto, On Fri, Feb 17, 2012 at 14:18, Antonio Cuni wrote: > def foo(x): >     return foo.__len__() How about "return len(foo)" instead? That's even more natural as Python code. But I guess anyway that all three solutions get JIT-compiled to basically the same thing. A bientôt, Ar

Re: [pypy-dev] question re: ancient SSL requirement of pypy

2012-02-17 Thread Leonardo Santagada
On Fri, Feb 17, 2012 at 3:23 PM, Armin Rigo wrote: > Hi Leonardo, > > On Fri, Feb 17, 2012 at 15:55, Leonardo Santagada wrote: >> why not statically link everything and mark the pre built binaries a >> "security risk" or whatever and then they will just work. > > Anyone can either install PyPy fr

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Armin Rigo
Hi Antoni, On Fri, Feb 17, 2012 at 15:51, Antoni Segura Puimedon wrote: > I saw that there will be a sprint soon in Berlin (and it not being that far > from Prague, if the dates allow, it might be possible for me to take some > vacation days and assist). You are most welcome to our sprints. No

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Antoni Segura Puimedon
Hi Armin, Thanks a lot for welcoming me to the sprint. Leipzig sounds even better for coming from Prague. In the end of June I am organizing a biggish LAN party near Barcelona, so I don't know if I will be able to come, but if there is a chance I will surely come. Any suggestion on where to start

Re: [pypy-dev] Poor performance with custom bytecode

2012-02-17 Thread Timothy Baldridge
>It's factorial(), so it's handling large "longs".  So it's about 2x as >slow as CPython.  End of the story. Funny enough, had just thought of that and given it a try. I switched it to calculating (fact 20) and (times 20) and PyPy is now 3x faster than CPython. Thanks for the help! Timothy

Re: [pypy-dev] question re: ancient SSL requirement of pypy

2012-02-17 Thread Timothy Baldridge
>> Anyone can either install PyPy from his own distribution, or translate >> it from sources; or attempt to get one of our nightly binary packages, >> which may or may not work because it's Linux.  I think that this is >> what you get on Linux, and we will not try to find obscure workarounds >> (li

[pypy-dev] [Repost] PyPy 1.8 50% slower than PyPy 1.7 on my test case

2012-02-17 Thread Laurent Vaucher
Sorry to repost, but does anyone have an idea about what I could do to track down the source of the slowdown? Should I run with some trace to try to compare how different parts behave? How could I do that? Thanks, Laurent. Hi and first of all, thanks for that great project. Now to my "problem". I

Re: [pypy-dev] STM status

2012-02-17 Thread Armin Rigo
Hi all, A negative update regarding HTM: from some sources, we can do the educated guess that Intel's Haswell processor, released in 2013, will have HTM --- at the level of the processor's L1 cache. That means that just a few kilobytes of memory can be part of a transaction's read/write set. Mor

Re: [pypy-dev] [Repost] PyPy 1.8 50% slower than PyPy 1.7 on my test case

2012-02-17 Thread Maciej Fijalkowski
On Fri, Feb 17, 2012 at 8:23 PM, Laurent Vaucher wrote: > > Sorry to repost, but does anyone have an idea about what I could do to track > down the source of the slowdown? Should I run with some trace to try to > compare how different parts behave? How could I do that? > > Thanks, > Laurent. Hi l

Re: [pypy-dev] STM status

2012-02-17 Thread Timothy Baldridge
>"this read/write needs not be tracked", so it has to record everything in > these few kilobytes. On that subject, how do I do this in the pypy STM? From what I understand, all read/writes inside a transaction.add() function are tracked, and the entire function is restarted if anything fails. Howe

Re: [pypy-dev] STM status

2012-02-17 Thread Armin Rigo
Hi Timothy, On Fri, Feb 17, 2012 at 19:39, Timothy Baldridge wrote: > On that subject, how do I do this in the pypy STM? You can't. Every change is tracked, at the level of Python. If you don't want to do this, it would require careful language design questions; I'll leave these for later. Th

Re: [pypy-dev] [Repost] PyPy 1.8 50% slower than PyPy 1.7 on my test case

2012-02-17 Thread Armin Rigo
Hi Laurent, On Fri, Feb 17, 2012 at 19:23, Laurent Vaucher wrote: > Sorry to repost, but does anyone have an idea about what I could do to track > down the source of the slowdown? We're busy, as Fijal said, but your issue is not forgotten. I have already put it there: https://bugs.pypy.org/iss

Re: [pypy-dev] PyPy/NumPyPy sprint(s) in Leipzig, Germany?

2012-02-17 Thread Mike Müller
Am 17.02.12 00:27, schrieb Antonio Cuni: > On 02/16/2012 10:17 PM, Armin Rigo wrote: >> Hi Mike, >> >> On Thu, Feb 16, 2012 at 22:07, Mike Müller >> wrote: >>> We can move the date. One week or only a few days? Like 22nd till 27th >>> of June would put four days in between the sprint and EP. >> >

Re: [pypy-dev] PyPy/NumPyPy sprint(s) in Leipzig, Germany?

2012-02-17 Thread Stefan Behnel
Antonio Cuni, 17.02.2012 00:27: > On 02/16/2012 10:17 PM, Armin Rigo wrote: >> On Thu, Feb 16, 2012 at 22:07, Mike Müller wrote: >>> We can move the date. One week or only a few days? Like 22nd till 27th >>> of June would put four days in between the sprint and EP. >> >> That would work too. Anton

Re: [pypy-dev] PyPy/NumPyPy sprint(s) in Leipzig, Germany?

2012-02-17 Thread Maciej Fijalkowski
On Fri, Feb 17, 2012 at 9:16 PM, Stefan Behnel wrote: > Antonio Cuni, 17.02.2012 00:27: >> On 02/16/2012 10:17 PM, Armin Rigo wrote: >>> On Thu, Feb 16, 2012 at 22:07, Mike Müller wrote: We can move the date. One week or only a few days? Like 22nd till 27th of June would put four days in

[pypy-dev] Questions Re: STM status

2012-02-17 Thread Andrew Francis
Hi Armin: From: Armin Rigo To: PyPy Developer Mailing List Sent: Thursday, February 16, 2012 3:58 PM Subject: [pypy-dev] STM status >An update for STM: today I managed to build a pypy using the new "stm >gc".  It runs richards.py on tannit: >in 1 thread: 23

Re: [pypy-dev] PyPy/NumPyPy sprint(s) in Leipzig, Germany?

2012-02-17 Thread Mike Müller
Am 17.02.12 20:26, schrieb Maciej Fijalkowski: > On Fri, Feb 17, 2012 at 9:16 PM, Stefan Behnel wrote: >> Antonio Cuni, 17.02.2012 00:27: >>> On 02/16/2012 10:17 PM, Armin Rigo wrote: On Thu, Feb 16, 2012 at 22:07, Mike Müller wrote: > We can move the date. One week or only a few days? Li

Re: [pypy-dev] Questions Re: STM status

2012-02-17 Thread Armin Rigo
Hi Andrew, On Fri, Feb 17, 2012 at 20:26, Andrew Francis wrote: > 1) I have been looking at the transaction module and its dependent modules. > In rstm.perform_transaction, I see a comment to a "custom GIL." So the GIL > is still there? Or will it be eventually removed? That's for tests. It's p

Re: [pypy-dev] PyPy/NumPyPy sprint(s) in Leipzig, Germany?

2012-02-17 Thread Stefan Behnel
Mike Müller, 17.02.2012 21:05: > Am 17.02.12 20:26, schrieb Maciej Fijalkowski: >> On Fri, Feb 17, 2012 at 9:16 PM, Stefan Behnel wrote: >>> Just a note that I'll be in Leipzig up to the 15th of June anyway (giving a >>> Cython course). I don't know if the week after that suits *anyone* >>> (includ

Re: [pypy-dev] STM status

2012-02-17 Thread Chris Dashiell
Hi, I just wanted to let you know the numbers I got on a 32 core server. 1 thread: 3280 ms 4 threads: 2665 ms 8 threads: 2976 ms 16 threads: 2878 ms 32 threads: 2714 ms Chris On Thu, Feb 16, 2012 at 3:58 PM, Armin Rigo wrote: > Hi all, > > An update for STM: today I managed to build a pypy us