Re: Dependence of precision on execution speed of Inverse
- To: mathgroup at smc.vnet.net
- Subject: [mg81606] Re: Dependence of precision on execution speed of Inverse
- From: Andrew Moylan <andrew.j.moylan at gmail.com>
- Date: Sat, 29 Sep 2007 02:26:33 -0400 (EDT)
- References: <fdi5li$q8j$1@smc.vnet.net>
On Sep 28, 4:06 pm, "Andrew Moylan" <andrew.j.moy... at gmail.com> wrote: > 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. Corrections of two typos I made: * In the last sentence, "Calling LinearSolve on Inverse" should read "Calling LinearSolve instead of Inverse". * In the subject line, "Dependence of precision on" should read "Dependence on precision of".