4 ms·
What a fun experiment. I quick converted it to Go using goroutines and waitgroups for fun: https://gist.github.com/schmichael/1a417808b8e88b684838ae9f4cd5d8be#f
by schmichael 4y ago
What a fun experiment. I quick converted it to Go using goroutines and waitgroups for fun: https://gist.github.com/schmichael/1a417808b8e88b684838ae9f4cd5d8be#file-out-txt https://gist.github.com/schmichael/1a417808b8e88b684838ae9f4...
- bob1029 4y agoI am seeing 500~600k tasks/second in .NET6 w/ TPL. Edit: Updating per request below. Tested on a TR2950x. I wonder if NUMA issues in my case or bad python version (3.9.4). Python 100,000 tasks 77,108 tasks per/s 200,000 tasks 69,945 tasks per/s 300,000 tasks 72,453 tasks per/s 400,000 tasks 74,636 tasks per/s 500,000 tasks 66,253 tasks per/s 600,000 tasks 77,576 tasks per/s 700,000 tasks 69,673 tasks per/s 800,000 tasks 68,176 tasks per/s 900,000 tasks 73,846 tasks per/s 1,000,000 tasks 68,013 tasks per/s .NET 6 100000 Tasks 523000 Tasks/s 200000 Tasks 550000 Tasks/s 300000 Tasks 550000 Tasks/s 400000 Tasks 559000 Tasks/s 500000 Tasks 547000 Tasks/s 600000 Tasks 539000 Tasks/s 700000 Tasks 547000 Tasks/s 800000 Tasks 540000 Tasks/s 900000 Tasks 560000 Tasks/s 1000000 Tasks 542000 Tasks/s
- lunfard000 4y agowould you mind sharing the go and python results running on your machine too? It is apples to orange comparation otherwise. EDIT. My results on a 5950x (undervolted) python3.8.exe test.py 100,000 tasks 139,130 tasks per/s 200,000 tasks 121,905 tasks per/s 300,000 tasks 120,000 tasks per/s 400,000 tasks 114,286 tasks per/s 500,000 tasks 119,403 tasks per/s 600,000 tasks 117,073 tasks per/s 700,000 tasks 130,612 tasks per/s 800,000 tasks 122,488 tasks per/s 900,000 tasks 120,000 tasks per/s 1,000,000 tasks 110,155 tasks per/s python3.11.exe .\test.py 100,000 tasks 206,452 tasks per/s 200,000 tasks 185,507 tasks per/s 300,000 tasks 186,408 tasks per/s 400,000 tasks 179,021 tasks per/s 500,000 tasks 167,539 tasks per/s 600,000 tasks 177,778 tasks per/s 700,000 tasks 188,235 tasks per/s 800,000 tasks 180,919 tasks per/s 900,000 tasks 168,421 tasks per/s .\test.exe (go 1.20 compiled) 100000 tasks 2710563.336378 tasks per/s 200000 tasks 3076885.207567 tasks per/s 300000 tasks 3332292.917434 tasks per/s 400000 tasks 3040479.422795 tasks per/s 500000 tasks 2810232.844653 tasks per/s 600000 tasks 3004138.200371 tasks per/s 700000 tasks 2738877.029117 tasks per/s 800000 tasks 2893730.985022 tasks per/s 900000 tasks 3043877.494077 tasks per/s 1000000 tasks 2857992.089078 tasks per/s
- chinaman425 4y ago[dead]
- benhoyt 4y agoYeah, I did the exact same thing and got very similar results. Just to save people clicking through, the Go/goroutine version is 25x as fast as Python. :-)