Computer Science Canada

Adding PyPy to the DWITE judge

Author:  trishume [ Thu Dec 08, 2011 8:51 pm ]
Post subject:  Adding PyPy to the DWITE judge

Is it possible that PyPy (http://pypy.org/) could be added to the DWITE judge?
It is a much faster (http://speed.pypy.org/) implementation of python 2.7

It would allow Python users to experience similar speeds to C++ / Java users.
Useful for questions like round #2 question #5, where even optimal solutions need all the speed they can get.
That is, if question #5 had valid test data...

I would appreciate it, and use it, if you added it. Download is here:
http://pypy.org/download.html

Author:  coolgod [ Thu Dec 08, 2011 9:48 pm ]
Post subject:  Re: Adding PyPy to the DWITE judge

while we're speeding up python can we also add a -02 optimization flag for the gcc compiler. It'll make c++/c speed closer to machine code.

Author:  Tony [ Thu Dec 08, 2011 10:26 pm ]
Post subject:  Re: Adding PyPy to the DWITE judge

coolgod @ Thu Dec 08, 2011 9:48 pm wrote:
can we also add a -02 optimization flag for the gcc compiler

With the exception of AJ going on a rampage and pushing the bounds of test-case sizes, that is hardly necessary. I'd be in favour of throwing in some flag to slow C++ down, so that you guys would quit writing naive O(n^2) solutions and letting the compiler mask performance issues.

Author:  trishume [ Fri Dec 09, 2011 8:21 am ]
Post subject:  Re: Adding PyPy to the DWITE judge

What if the AJ monster strikes again? Another example is that contest a few years ago that involved brute-forcing a hash.

Even with the intended union finding solution for question #5 the test file is still huge.

I bet even an optimal c++ solution would push the time limit.

When I'm done practicing python by writing a solution to #5 that handles AJ's messed up test data I'll see if python is fast enough even with an optimal solution.

Author:  Dan [ Fri Dec 09, 2011 8:28 am ]
Post subject:  RE:Adding PyPy to the DWITE judge

I am some what reluctant to add new langues to the judge with out some kind of insurance that some one is actually going to use them. Offten I end up adding a new language due to a request and it gets used once or twice but i am stuck making tests for it and supporting it for the rest of time (or at least the rest of the DWITE rounds :p).

May be we could put up some kind of poll to ask users what langue they would like added and add the most popular one for the next round. So far D, C++11 and PyPy have been suggested, any others for such a poll?

Author:  trishume [ Fri Dec 09, 2011 3:52 pm ]
Post subject:  Re: Adding PyPy to the DWITE judge

I'm planning on using it and someone else on my team is a python person. I'm sure the other python people that do contest would appreciate the speed as well.

Just wondering: why did you install FORTRAN, turbo pascal, alice ML and IO then? Has anyone ever used them?

Author:  Dan [ Fri Dec 09, 2011 5:13 pm ]
Post subject:  Re: Adding PyPy to the DWITE judge

trishume @ 9th December 2011, 3:52 pm wrote:

Just wondering: why did you install FORTRAN, turbo pascal, alice ML and IO then? Has anyone ever used them?


Fortran came with the mingw install, all the others where requested then almost never used.

Author:  trishume [ Fri Dec 09, 2011 6:06 pm ]
Post subject:  Re: Adding PyPy to the DWITE judge

You could probably get rid of them. No one would mind.


: