python - How do I make gmpy array operations faster? -
I am having trouble with speed while trying to use the GMP module. Import NMP as GMP 2 GM = N = 1000 A = Range (N)% Time [for Gmcene (X)) Import as GMP 2 in the 100 # Loop; Most Good 3: 7.3 9 ms per loop% time np esin (a) # 10000 loops, best 3: 198 us per loop I was thinking that I somehow speed up this calculation Can I give I was thinking that JIT or multi-processing can help, but I do not know how to do it. Any help would be greatly appreciated if you want to post me more information, please let me know. I was curious to see how much performance increase would be possible, so gmpy2 , which completely calculates sin of a list in C. Unfortunately, there was not much improvement. For the% timeit [gmpy2.sin (x)) 100 loops, the best 3: 4.85 ms per loop% timeit map (gmpy2.sin, a) 100 loops, best 3: 4.59 ms per loop% timeit gmpy2.vector (a) 100 loops, best 3: 4.44 ms per loop gmpy2 does not issue Global Interpreter Lock (GIL) Threading will not help Multiprocessing c...