воскресенье, 21 октября 2012 г.

Python is nearby!

Recently I've decided, that knowledge of Python will be a good addition to Perl-programmer.
Althoug, it is beautiful (maybe just beacuase it's new to me), it has some big disadvantages. 

One of them is that it is very slow! Yestarday night and tomorrow I had been fighting with problem on codechef:
http://www.codechef.com/problems/INTEST
Nothing helped  me to pass the test. The failure is in the way how Python reads from stdin. It's very slow. Neither raw_input(2.7.2), nor input(3.2.1) passed input test limit. Moreover, I tried os.read() function and again not good news :( . I also found direct method reading from stdin: sys.stdin.readlines(), but it was not helpful.

What can I say? Maybe Python < 2.7.2 really can handle it:

But now in codechef there is Python  interpreters greater, then 2.7.1

One failure is unable spot my mood. But it is not very cozy to know, that upgrading PYTH on your large data-set systems can cause increasing execution of functionality, written on python .

Комментариев нет:

Отправить комментарий