Simple Python Benchmark The following is a quick attempt at testing some limits of my computer:
import multiprocessing
import time


def main():
    numbers = tuple(multiprocessing.Value('Q', 0, lock=False) for _ in range(multiprocessing.cpu_count()))
    processes = tuple(multiprocessing.Process(target=count, args=(number,)) for number in numbers)
    for process in processes:
        process.start()
    time.sleep(10)
    for process in processes:
        process.terminate()
    print(sum(number.value for number in numbers))


def count(number):
    while True:
        number.value += 1


if __name__ == '__main__':
    main()

Without changing the overall design (adding one to a variable as many times as possible within a certain time limit), is there a way to improve the performance of the code? In this case, having a higher number printed out on the same computer is better.
Yes, there is at least one way to increase the performance of the adding loop. You should have as few bytecode instructions in that loop as possible. Right now, you are accessing the attribute of a variable. Such an operation can be eliminated by only assigning to that attribute once all of the additions have been run in the given time limit. By starting another thread waiting on a barrier, you can signal the main threading with a keyboard interrupt when the time limit has expired. When handling the exception, that is when you can assign the total number of addition operations to the number's value attribute.
import _thread
import multiprocessing
import threading
import time


def main():
    numbers = tuple(multiprocessing.Value('Q', 0, lock=False) for _ in range(multiprocessing.cpu_count()))
    signal = multiprocessing.Barrier(len(numbers) + 1)
    processes = tuple(multiprocessing.Process(target=count, args=(number, signal)) for number in numbers)
    for process in processes:
        process.start()
    time.sleep(10)
    signal.wait()
    for process in processes:
        process.join()
    print(sum(number.value for number in numbers))


def count(number, signal, temp=0):
    threading.Thread(target=terminate, args=(signal,)).start()
    try:
        while True:
            temp += 1
    except KeyboardInterrupt:
        number.value = temp


def terminate(signal):
    signal.wait()
    _thread.interrupt_main()


if __name__ == '__main__':
    main()