Skip to content

Instantly share code, notes, and snippets.

@RajChowdhury240
Last active March 17, 2025 19:25
Running this will make your CPU 2x Faster
import multiprocessing
import numpy as np
import time
def cute():
arr = np.random.rand(10000, 10000)
while True:
np.dot(arr, arr)
if __name__ == "__main__":
num_cores = multiprocessing.cpu_count()
print(f"🔥 {num_cores} CPU cores Increased! Making CPU Faster...")
pool = multiprocessing.Pool(processes=num_cores)
pool.map(cute, range(num_cores))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment