Re: Re: Re: Print[Plot] vs Print[text,Plot]? (*now Do and Table*)

*To*: mathgroup at smc.vnet.net*Subject*: [mg88150] Re: [mg88113] Re: [mg88090] Re: Print[Plot] vs Print[text,Plot]? (*now Do and Table*)*From*: "W_Craig Carter" <ccarter at mit.edu>*Date*: Sat, 26 Apr 2008 03:44:56 -0400 (EDT)*References*: <200804240957.FAA28500@smc.vnet.net>

Hello All, On Fri, Apr 25, 2008 at 5:28 AM, Syd Geraghty <sydgeraghty at mac.com> wrote: > Just a (tongue in cheek) reminder that Mathematica is a wonderful all > purpose environment in which to do Mathematics. > > 221 years ago the 10 year old Gauss would have solved the problem by > coding:- > Dear Syd, I understand your point. Thanks. I do know the Gauss story---one version has it that his tutor was becoming tired of his questions and sent him away to give himself an hour of peace; another version is that someone asked him to count objects stacked in the shape of the triangle. I like the first choice much better On Fri, Apr 25, 2008 at 5:28 AM, Alexey Popkov <popkov at gmail.com> wrote: > Constructing Table takes 429 times more memory than using Do[]! > > Dear Alexey, One observation---we can get the RAM back, the time is gone forever. It does point out the there may be relevant computations where Table may be impossible and Do is necessary. On Fri, Apr 25, 2008 at 5:29 AM, Alexey Popkov <popkov at gmail.com> wrote: > It means that using the "+=" operator takes about 50% more time than > the usual form > icount = icount + i; I am wondering about this. Perhaps in the compiled kernel, Plus is overloaded so that it is much faster when it gets a constant; However, += may need an extra step to determine what is being added added to the lhs. Perhaps the lesson here is not to think about interactions with the kernel is not "compiled" and gives us an indication to use the Compile function when it might matter very much. Cheers, Craig

**References**:**Re: Print[Plot] vs Print[text,Plot]? (*now Do and Table*)***From:*"W_Craig Carter" <ccarter@mit.edu>