Re: Wolfram, meet Stefan and Boltzmann
- To: mathgroup at smc.vnet.net
- Subject: [mg117430] Re: Wolfram, meet Stefan and Boltzmann
- From: Uayeb <uayebswinburne at gmail.com>
- Date: Fri, 18 Mar 2011 06:00:51 -0500 (EST)
- References: <ili6f5$kk2$1@smc.vnet.net> <ilksdj$6b2$1@smc.vnet.net>
Considering Daniel's comments about needing to load som .mx files, and some of my own experience with Mathematica and other packages, I'll hazard a guess that this is because of Mac OS X's disk caching. As an example, I use IDL a fair bit (not particularly because I like it, but because a lot of astronomy code is already in IDL). In the process of reducing astronomical datasets, I often call IDL from the command line over and over to do various steps of the reduction. Each time, IDL is loaded from scratch (terribly inefficient, I know, but faster than me rewriting my code). The first time it is called, it often takes some seconds to load, however, all the subsequent invocations are much faster (under 1 second). I have always assumed this is because of Mac OS X's disk caching mechanism. When a file is requested from disk, the contents of the file are loaded into free ram so that any subsequent request for the file is handled from ram rather than from disk. (This ram usage is labeled "Inactive" in activity monitor, from my understanding, and is dumped as soon as an application requests more ram). A speed consious user will also note that for a file being regularly accessed, putting the file on a "Ram disk" often has little, if any, speed improvement than leaving it on a physical disk, except for the first access. My guess, therefore, is that most of us using Mathematica on a regular basis, will not see the associated speed delay AES is mentioning even if we quit Mathematica because many of the relevant files are still cached in ram. In previous (non-Mathematica=96Word loading times, actually) discussions of application performance, my understanding is that the only way to eliminate the OS caching impacting your results is to run the test on a freshly restarted machine. Unless I've missed it, AES has not commented on whether subsequent evaluations of the integral are any faster, or if this happens everytime s/he restarts the kernal, which might be more interesting. Afterall, much of the performance of a modern computer is wrapped up in all the various levels of caching, mostly because much of what we want to do is the same or very similar to what we have just done. So a purely unchaced senario is not particularly representative. Cheers, Andy On Mar 16, 10:39 pm, AES <sieg... at stanford.edu> wrote: > In article <ilnh9v$ob... at smc.vnet.net>, Roman <rschm... at gmail.com> > wrote: > > > AES, > > mine is taking 18 seconds as well, and I have a MacBook as well. Maybe > > a Mac hardware thing? > > Thanks for confirmation. > > For the record, I'm absolutely not pushing any agenda here -- just > curious. Macs and Mathematica do many things so blazingly fast it's > near unbelievable. And this seems like a relatively simple, smooth > integral using only simple, smooth, commonplace functions. So why does > evaluating it take so long?