Re: Globally limiting precision or accuracy
- To: mathgroup at smc.vnet.net
- Subject: [mg61024] Re: [mg61010] Globally limiting precision or accuracy
- From: jmt <jmt at dxdydz.net>
- Date: Sat, 8 Oct 2005 02:48:30 -0400 (EDT)
- Organization: dxdydz
- References: <200510070737.DAA03251@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
- I don't think reducing $MachinePrecision below the default value for your workstation will improve speed, since calculation are probably done using the floating-point capabilities of your cpu ; - Check if you ever do use extended precision numbers ; - Try to use integer arithmetic instead of floating point arithmetic ; - Check for useless calculations, e.g. computation involving euclidian distance can generally be performed on Power[distance,2], taking a square root is useless. jmt On Friday 07 October 2005 09:37, Lee Newman wrote: > Dear Group, > > Situation > - I have a large neural network model (my own code, not Wolfram's > toolbox) that currently has a run time of about 20hours. > - I am in the process of trying to profile and optimize the code > (mostly matrix computations) to reduce the run time. > - All of the computationas that I do are numerical. > > Questions > (1) If I am not concerned about numerical accuracy beyond 3 decimal > places for any of the computations in the model, can I improve > performance by telling mathematica to globally restrict its accuracy (or > precision) for all computations? > > (2) If so, how do I do this? Is it as simple as setting > $MachinePrecision=3? Is there a global way (rather than local use of > N[]) to ensure that all computations are done numerically, and with > machine precision? > > Thanks, > Lee Newman
- References:
- Globally limiting precision or accuracy
- From: Lee Newman <leenewm@umich.edu>
- Globally limiting precision or accuracy