Timeline for How do I speed up this simulation program
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 16, 2024 at 21:12 | comment | added | Attack68 | Pep8 module level constants are usually all caps. The only reason I didnt use all caps is it was easier to stick with the OP original naming for comparison and when editing to avoid errors. I prefer the capital C because it is more obvious and it better suited the task presented here and made the answer clearer to me and, in my opinion, to most. | |
| May 16, 2024 at 20:51 | comment | added | J_H | Choosing a “this is a constant” prefix is a design choice, that’s cool. But please prefer lowercase “c_” over the proposed “C_”, out of respect for PEP-8. (I gave the OP a pass on most naming details, due to very helpful adherence to math conventions which are a bit different from python conventions.) Yeah, yeah, I know, manifest constants are typically upcased. But here, mixed case sometimes makes an identifier more readable, more familiar. | |
| May 16, 2024 at 17:05 | history | edited | Attack68 | CC BY-SA 4.0 |
added 1534 characters in body
|
| May 16, 2024 at 16:19 | comment | added | Attack68 | I used the profiling tool in the professional version of Pycharm, which uses the cProfile profiler. | |
| May 16, 2024 at 15:45 | comment | added | Jonathan Wick | Thanks! Actually using explcit cross product made it even faster, I precalculated the random number array, now it runs is about 0.5 seconds. Could you tell me how you got that screenshot of benchmark statistics? | |
| May 16, 2024 at 15:11 | history | edited | Attack68 | CC BY-SA 4.0 |
added 608 characters in body
|
| May 16, 2024 at 15:01 | comment | added | Kate | Takes less than one second to run on my end. A significant improvement in terms of speed. | |
| May 16, 2024 at 14:59 | history | edited | Attack68 | CC BY-SA 4.0 |
added 461 characters in body
|
| May 16, 2024 at 14:28 | history | answered | Attack68 | CC BY-SA 4.0 |