Skip to content

Commit

Permalink
add unit in execution times
Browse files Browse the repository at this point in the history
  • Loading branch information
aktech authored Jul 18, 2024
1 parent fc93aef commit b293d84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python_c_extension/c_extension_gil.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def run_count_in_multiple_threads(count_func=count):


if __name__ == '__main__':
print('Single Thread (C extension): %8f' % (run_count_in_single_thread(count)))
print('Two Threads (C extension): %8f' % (run_count_in_multiple_threads(count)))
print('Single Thread (C extension): %8f s' % (run_count_in_single_thread(count)))
print('Two Threads (C extension): %8f s' % (run_count_in_multiple_threads(count)))

print('Single Thread (Pure Python): %8f' % (run_count_in_single_thread(count_pure_python)))
print('Two Threads (Pure Python): %8f' % (run_count_in_multiple_threads(count_pure_python)))

0 comments on commit b293d84

Please sign in to comment.