Re:Python 3 in 2016
by marmaduke on Thursday February 18, 2016 @09:20AM
(#11125870)
All this because you didn't profile your code to see that 95% of the time was spent in GMP routines.
[ Parent
| on HN ]
Yeah. 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".