Hi Fijal, On Tue, Mar 27, 2012 at 15:30, Maciej Fijalkowski <fij...@gmail.com> wrote: > This sounds overly specific to me. What do others think?
It is indeed overly specific, but it may be useful nevertheless. We need to rephrase it to point out the specific-vs-general parts. Something like this: Q: How can I test and benchmark a modification to RPython? (As opposed to a modification done in the source code of the PyPy Python interpreter) A: As an example, let's say that you want to tweak pypy.rlib.rstring.StringBuilder. This file contains the implementation for tests only; the real translated implementation is in pypy.rpython.lltypesystem.rbuilder. This is tested by pypy.rpython.test.test_rbuilder. Be sure that any tweak you do still passes the existing tests, and if possible, add new tests specifically for your changes. (Run the tests with: python test_all.py rpython/test/test_rbuilder.py) Then to get benchmarks: based on the existing examples, create a new StringBuilder benchmark as the file pypy/translator/targetStringBuilder.py which will time the functionality --- written as a small RPython program --- and do this: $ cd pypy/translator/goal/ $ python translate.py targetStringBuilder.py $ ./targetStringBuilder-c You don't need to translate the full PyPy Python interpreter to benchmark every change. However, you should do it once at the end, to make sure that no corner case has been missed and that the performance improvements are visible there as well. --- Armin _______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev