Dependence of precision on execution speed of Inverse
- To: mathgroup at smc.vnet.net
- Subject: [mg81568] Dependence of precision on execution speed of Inverse
- From: "Andrew Moylan" <andrew.j.moylan at gmail.com>
- Date: Fri, 28 Sep 2007 02:06:13 -0400 (EDT)
m1=RandomReal[1,{50,50}]; m2=SetPrecision[m1,14]; Do[Inverse[m1];,{1500}]//Timing Do[Inverse[m2];,{10}]//Timing On my machine, both Timing results are about the same, indicating that Inverse (of 50x50 matrices) is about 150 times faster for machine-precision numbers than for arbitrary precision numbers (of precision ~14). This factor of 150 seems large. Does Mathematica employ an Inverse algorithm that is optimised for Mathematica's arbitrary-precision numbers? Notes: * Changing the precision of m2 from 14 to e.g. 17 makes little difference. * Calling Developer`FromPackedArray[] on m1 makes little difference. * Calling LinearSolve on Inverse yields somewhat different results, but still shows a difference in execution time of a factor of order 100.