2 ms·
All this because you didn't profile your code to see that 95% of the time was spent in GMP routines.
by marmaduke 11y ago
All this because you didn't profile your code to see that 95% of the time was spent in GMP routines.
- kale 11y agoYeah. I wasn't sure how GMPY was compiled, so I used C with my own compilation of GMP. I bet the flag differences made up the few percentage points. Plus, with each variable being ~10Mb, I was concerned about memory copying (I studied mechanical engineering, I missed a lot of this stuff in school), and with C I could make memory copying vs passing pointers explicit. All of that was unnecessary. It was another reinforcement of the idea: "Build it first, then optimize".