Skip to content
Snippets Groups Projects
Commit 73f7a464 authored by Rioux Jeremy's avatar Rioux Jeremy
Browse files

8 thread sah

parent 9eeaebd0
No related branches found
No related tags found
No related merge requests found
......@@ -15,15 +15,15 @@ def thread_wrapper(start, end, results, index):
# Single-threaded execution
def single_threaded():
start_time = time.time()
compute_task(0, 10_000_000)
compute_task(0, 100_000_000)
end_time = time.time()
return end_time - start_time
# Multi-threaded execution
def multi_threaded():
start_time = time.time()
num_threads = 4
step = 10_000_000 // num_threads
num_threads = 8
step = 100_000_000 // num_threads
threads = []
results = [0] * num_threads
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment