Im wondering if anyone cant tell me if multiprocessing can be used to speed up equation solving for calculating really large numbers without having to use a user defined function? Im trying to run a routine either in python 3.4 IDLE or as a simple script. The below takes an average of about 10 seconds to perform... Id like to speed this up as much as possible. If I import multiprocessessing and if I use a pool ( I have two CPUS on my system), it seems the only thing that all the docs refer to is using this via a function (def), is there a way to dump the below to multiprocessing with out having to do that? If I cant do that - can someone give me a code tip on how to wrap the below in a function statement that will work in idle or as a script? Am new to python and also to Sympy..... thanks for any feedback you can offer. See code below ;
.............................. import sys from sympy import mpmath from mpmath import * mpmath.mp.dps = 20000 import time e0=time.time() c0=time.clock() xxx = mpmath.power(1.41, 0.249429034 * 4500) xy1 = xxx * 110.4807667 result1a = '%.2f'%((xy1) % 1080) print(result1a) elapsed_time=time.time() -e0 cpu_time=time.clock() -c0 print(cpu_time) -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAJiOfxTbr09YqHV%2BBmvFc3ABWWoL8zqfO0XyFaHhwtzmr7DYfg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.