
Code: Select all
import ctypes
pittichess-noncli = cdll.LoadLibrary("cutechesslib.so")
Moderator: Ras
Code: Select all
import ctypes
pittichess-noncli = cdll.LoadLibrary("cutechesslib.so")
I have measured performance of several interpreted scripting languages. Python really didn't shine. Pypy actually impressed me, even if not competitive with LuaJIT (which is absolutely fantastic).lucasart wrote:Have you measured it ? Have you even tried it ? (+same questions on PyPy).
That remains to be seen, what about GC? Are you sure it won't trigger often during the test run? Are you sure it won't produce additional noise?I claim that you won't see a difference in any realistic testing scenario, because almost all the time is spend waiting for I/O operations.
Didn't like the feedback? Quoting Linus instead of fixing a bug is cheap.Talk is cheap, show us your code...
Well, you shouldn't beAndrewGrant wrote:Hey, I'm proud of that "nasty" hack!
Correction: now I see that the hack actually works in all cases so no race/no hanging is possiblemar wrote:You know very well the hack doesn't prevent the race.
Good for you. And good to know who defecated Lucas' codeAndrewGrant wrote:To restate. I'm proud of my nasty hack.
You understand that python is not actually managing the running engines, right? Once the engines are launched and given commands they don't give a damn about the python code that spawned them. The only control that python has over them is knowing their process IDs and being able to kill them when python wants to.I have measured performance of several interpreted scripting languages. Python really didn't shine. Pypy actually impressed me, even if not competitive with LuaJIT (which is absolutely fantastic).
That remains to be seen, what about GC? Are you sure it won't trigger often during the test run? Are you sure it won't produce additional noise?
Didn't like the feedback? Quoting Linus instead of fixing a bug is cheap.
You know very well the hack doesn't prevent the race.
After you took some time to think about it you came around to see that it worked. If you don't like the response Lucas gave, then you SHOULD write some code to show us. I tried a dozen things, and found this is be the most simple, reliable solution I could come up with. If you know of a better method, please share. I am always open to learning new things.Correction: now I see that the hack actually works in all cases so no race/no hanging is possible
There's no GC in CPython, which uses reference counting. This is essentially equivalent to C++ RAII, where the object are destroyed when no longer needed (goes out of scope in C++, reference count drops to zero in CPython).mar wrote: what about GC? Are you sure it won't trigger often during the test run? Are you sure it won't produce additional noise?