<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Buggy Profiler option	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/buggy-profiler-option/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/buggy-profiler-option?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=buggy-profiler-option</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Sat, 15 Dec 2012 10:23:47 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Tim Holy		</title>
		<link>https://undocumentedmatlab.com/articles/buggy-profiler-option#comment-133750</link>

		<dc:creator><![CDATA[Tim Holy]]></dc:creator>
		<pubDate>Sat, 15 Dec 2012 10:23:47 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3288#comment-133750</guid>

					<description><![CDATA[At least as of 2011 (and may still be true), perhaps the biggest difference between the CPU and wall clock options is how they handle multithreading. It seems that CPU time does something along the lines of summing the time spent by all processors. On systems with many CPUs, this can be pretty confusing: for example, I&#039;ve found that it&#039;s possible to come to the conclusion that repmat is faster than bsxfun, which I&#039;ve never found to be true in reality.

Switching to wall time is now one of my startup.m settings.]]></description>
			<content:encoded><![CDATA[<p>At least as of 2011 (and may still be true), perhaps the biggest difference between the CPU and wall clock options is how they handle multithreading. It seems that CPU time does something along the lines of summing the time spent by all processors. On systems with many CPUs, this can be pretty confusing: for example, I&#8217;ve found that it&#8217;s possible to come to the conclusion that repmat is faster than bsxfun, which I&#8217;ve never found to be true in reality.</p>
<p>Switching to wall time is now one of my startup.m settings.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dan S.		</title>
		<link>https://undocumentedmatlab.com/articles/buggy-profiler-option#comment-133136</link>

		<dc:creator><![CDATA[Dan S.]]></dc:creator>
		<pubDate>Thu, 13 Dec 2012 06:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3288#comment-133136</guid>

					<description><![CDATA[On 64-bit linux &quot;-timer cpu&quot; and &quot;-timer real&quot; are definitely different.  I recently found the default &quot;-timer cpu&quot; to be somewhat uselessly unpredictable on a quad-core cpu on linux, and verified the same issues back at least to 2010a.  Slight changes in the code would show up as major profile differences on lines before the change, and profiled times often disagreed with tic/toc too substantially to make any sense.  According to the mathworks rep it was at least partly because I profiled a script rather than a function, although why this should be was not explained.  I&#039;ve used the default timer for years, but no more.]]></description>
			<content:encoded><![CDATA[<p>On 64-bit linux &#8220;-timer cpu&#8221; and &#8220;-timer real&#8221; are definitely different.  I recently found the default &#8220;-timer cpu&#8221; to be somewhat uselessly unpredictable on a quad-core cpu on linux, and verified the same issues back at least to 2010a.  Slight changes in the code would show up as major profile differences on lines before the change, and profiled times often disagreed with tic/toc too substantially to make any sense.  According to the mathworks rep it was at least partly because I profiled a script rather than a function, although why this should be was not explained.  I&#8217;ve used the default timer for years, but no more.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Eric S		</title>
		<link>https://undocumentedmatlab.com/articles/buggy-profiler-option#comment-133008</link>

		<dc:creator><![CDATA[Eric S]]></dc:creator>
		<pubDate>Wed, 12 Dec 2012 17:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3288#comment-133008</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/buggy-profiler-option#comment-132701&quot;&gt;Yair Altman&lt;/a&gt;.

Thanks Yair - but what I remember hearing was that technically, being able to measure CPU time has become more challenging (or maybe not possible accurately?). Maybe this was specific to Windows? Either way I&#039;m trying to remember a conversation from 5 years ago, so you&#039;ll have to excuse my rustiness :)

Cheers]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/buggy-profiler-option#comment-132701">Yair Altman</a>.</p>
<p>Thanks Yair &#8211; but what I remember hearing was that technically, being able to measure CPU time has become more challenging (or maybe not possible accurately?). Maybe this was specific to Windows? Either way I&#8217;m trying to remember a conversation from 5 years ago, so you&#8217;ll have to excuse my rustiness 🙂</p>
<p>Cheers</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/buggy-profiler-option#comment-132701</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 11 Dec 2012 21:06:29 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3288#comment-132701</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/buggy-profiler-option#comment-132691&quot;&gt;Eric S&lt;/a&gt;.

@Eric - I think that even in a modern environment there can be a use for both CPU and wall clock profiling: The former highlights algorithmic hotspots, whereas the latter highlights I/O hotspots, for example.

As for your suggestion to fish for clarifications via CSSM/blogs, there was actually a recent &lt;a href=&quot;https://www.mathworks.com/matlabcentral/newsreader/view_thread/324161&quot; rel=&quot;nofollow&quot;&gt;CSSM thread&lt;/a&gt; that posted on the same day as my article (a pure coincidence - I usually prepare my articles several days before posting). Anyway, that CSSM thread did not get a response from any MathWorker. This blog has very high visibility at TMW, so all the relevant people there are now well aware of my post. No official response was given here, not because they are not aware of this, but because they chose not to do so. You shouldn&#039;t read too much into this - there can be numerous reasons why they chose not to respond (in fact, they do respond very rarely here, but not for lack of interest).]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/buggy-profiler-option#comment-132691">Eric S</a>.</p>
<p>@Eric &#8211; I think that even in a modern environment there can be a use for both CPU and wall clock profiling: The former highlights algorithmic hotspots, whereas the latter highlights I/O hotspots, for example.</p>
<p>As for your suggestion to fish for clarifications via CSSM/blogs, there was actually a recent <a href="https://www.mathworks.com/matlabcentral/newsreader/view_thread/324161" rel="nofollow">CSSM thread</a> that posted on the same day as my article (a pure coincidence &#8211; I usually prepare my articles several days before posting). Anyway, that CSSM thread did not get a response from any MathWorker. This blog has very high visibility at TMW, so all the relevant people there are now well aware of my post. No official response was given here, not because they are not aware of this, but because they chose not to do so. You shouldn&#8217;t read too much into this &#8211; there can be numerous reasons why they chose not to respond (in fact, they do respond very rarely here, but not for lack of interest).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Eric S		</title>
		<link>https://undocumentedmatlab.com/articles/buggy-profiler-option#comment-132691</link>

		<dc:creator><![CDATA[Eric S]]></dc:creator>
		<pubDate>Tue, 11 Dec 2012 20:22:58 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3288#comment-132691</guid>

					<description><![CDATA[Yair, from what I remember hearing from a TMWer, the ability to measure CPU time has become more and more meaningless over time as things such as hyperthreading, complex pipelining, and multi-core/CPU technologies have been developed. I wouldn&#039;t be surprised if CPUTIME went away in a future version (or just returned wall time), and the same thing could happen with the profiler. See the note at the end of the following doc page: http://www.mathworks.com/help/matlab/matlab_prog/analyzing-your-programs-performance.html

Maybe you could post a question on CSSM or email one of the blog owners to see if they can clarify all of this :)]]></description>
			<content:encoded><![CDATA[<p>Yair, from what I remember hearing from a TMWer, the ability to measure CPU time has become more and more meaningless over time as things such as hyperthreading, complex pipelining, and multi-core/CPU technologies have been developed. I wouldn&#8217;t be surprised if CPUTIME went away in a future version (or just returned wall time), and the same thing could happen with the profiler. See the note at the end of the following doc page: <a href="http://www.mathworks.com/help/matlab/matlab_prog/analyzing-your-programs-performance.html" rel="nofollow ugc">http://www.mathworks.com/help/matlab/matlab_prog/analyzing-your-programs-performance.html</a></p>
<p>Maybe you could post a question on CSSM or email one of the blog owners to see if they can clarify all of this 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm Lidierth		</title>
		<link>https://undocumentedmatlab.com/articles/buggy-profiler-option#comment-118901</link>

		<dc:creator><![CDATA[Malcolm Lidierth]]></dc:creator>
		<pubDate>Sun, 04 Nov 2012 18:00:13 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3288#comment-118901</guid>

					<description><![CDATA[From the command line:

&lt;pre lang=&quot;matlab&quot;&gt; 
profile on -timer cpu;
pause(2);
profile off;
profile report
&lt;/pre&gt;

works as expected giving:

&lt;code&gt;No profile information to display.&lt;/code&gt;

But making test.m a script gives the same result as the function.]]></description>
			<content:encoded><![CDATA[<p>From the command line:</p>
<pre lang="matlab"> 
profile on -timer cpu;
pause(2);
profile off;
profile report
</pre>
<p>works as expected giving:</p>
<p><code>No profile information to display.</code></p>
<p>But making test.m a script gives the same result as the function.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
