Python Forum

Full Version: i want this program to be as fast as possible
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i want this program to be as fast as possible, so i might do it in C. it's an admin tool. what it is to do on Linux or Unix is to force the PID number to wrap around, typically at 32767, but maybe at other numbers as high as 65535. if PID numbers exceed 65535 then the platform is apparently using more than 16 bits for the PID number, and the program should abort out of fear of 2147483647. can someone do this super fast, nearly as fast as it can be done in C, Python? if it finds itself running on Windows i don't know what it should do because i don't know how Windows does this. if it just aborts, that's fine.
I want world peace and to prevent people starving...
OK, on more personal level - unlimited and fast Internet connection... (Yeah, I'm joking)

Does anyone else would like to share? :-)
As fast as possible means written in Assembly. This is like a magic for me.

I want one night with Scarlett Johansson. Angel
you can set Linux max PID up to 2^22 (on 32 bit machine)
stored in
Output:
/proc/2497/limits
you can also use:
Output:
cat /proc/sys/kernel/pid_max
to get what it's set to
see: https://linux.die.net/man/5/limits.conf