Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8932

Re: much power to mathematica

From Bill Rowe <readnews@sbcglobal.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: much power to mathematica
Date 2012-03-09 11:09 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jjcocu$q7b$1@smc.vnet.net> (permalink)

Show all headers | View raw


On 3/8/12 at 4:41 AM, dave@removedbailey.co.uk (David Bailey) wrote:

>On 06/03/2012 10:59, Bill Rowe wrote:
>>On 3/5/12 at 1:03 AM, aleks.post@gmail.com (Alexey Kornetov) wrote:

>>>Hmm.. You are right. I'm new in mathematica if there is the way to
>>>allocate evolution between the cores to gain much speed?

>>To allocate processing between cores you need to write your code to
>>make use of functions such as ParallelTable. That is, your code
>>needs to take advantage of parallel processing. Note, parallel
>>processing can and will speed up some things but not all things.

>Since you say you are a newcomer to Mathematica, I would be very
>wary about plunging into parallel constructs unless you are sure
>your code cannot be speeded up in other ways, such as:

>Use of functional constructs.

>Ensuring all arrays are 'packed'.

>etc.

>Remember that the maximum possible gain from parallelisation is
>given by the number of cores on your machine, whereas other speedup
>tricks can often achieve larger savings.

This is most excellent advice. In fact, I should have made it
clear I myself seldom use things like Compile or parallel
processing to achieve speed improvements. I've found simply
understanding my problem throughly and applying the correct
functional constructs generally gives the performance I need.

Both Compile and parallel processing can produce significant
performance gains for some code and some problems. Compile is
often particularly effective for procedural code. But it is very
important to know neither Compile nor parallel processing will
always produce performance gains. For a great many problems both
can actually degrade performance of well written functional code
in Mathematica.

Getting maximum performance from Mathematica very much requires
a complete understanding of the problem you are trying to solve
and some effort in looking at how your code is working. There is
no single simple approach guaranteed to always speed up
Mathematica code.

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: much power to mathematica Bill Rowe <readnews@sbcglobal.net> - 2012-03-09 11:09 +0000
  Re: much power to mathematica Alexey Kornetov <aleks.post@gmail.com> - 2012-03-10 11:20 +0000

csiph-web