<?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: Solver Foundation optimization library</title>
	<atom:link href="http://www.johndcook.com/blog/2009/12/23/microsoft-solver-foundation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johndcook.com/blog/2009/12/23/microsoft-solver-foundation/</link>
	<description>The blog of John D. Cook</description>
	<lastBuildDate>Sat, 11 Feb 2012 01:10:06 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Domagoj</title>
		<link>http://www.johndcook.com/blog/2009/12/23/microsoft-solver-foundation/comment-page-1/#comment-29807</link>
		<dc:creator>Domagoj</dc:creator>
		<pubDate>Tue, 29 Dec 2009 22:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=3924#comment-29807</guid>
		<description>I use a .Net library (Bluebit) for maths and linear algebra. It is blazingly fast. It does so many low level optimisation stuff I could never learn (and don&#039;t give a ***) so ending up inverting matrices 250x250 in 6 ms. I made a wow to myself that anything that has O(n) should not be optimised in any way. Only thing that gets optimised are calls to database and any algorithm with O(n log n) or higher!
To paraphrase, C# is good enough for regular stuff. Optimise where it needs to be optimised, at the algorithm level and use libraries for maths.</description>
		<content:encoded><![CDATA[<p>I use a .Net library (Bluebit) for maths and linear algebra. It is blazingly fast. It does so many low level optimisation stuff I could never learn (and don&#8217;t give a ***) so ending up inverting matrices 250&#215;250 in 6 ms. I made a wow to myself that anything that has O(n) should not be optimised in any way. Only thing that gets optimised are calls to database and any algorithm with O(n log n) or higher!<br />
To paraphrase, C# is good enough for regular stuff. Optimise where it needs to be optimised, at the algorithm level and use libraries for maths.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.johndcook.com/blog/2009/12/23/microsoft-solver-foundation/comment-page-1/#comment-29548</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Thu, 24 Dec 2009 16:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=3924#comment-29548</guid>
		<description>&lt;blockquote&gt;
In C#, every time a[i] and b[i] are evaluated, code executes to verify that the index i is within the legal range of index values for the two arrays. In C++ you could do some bounds checking before you compute your inner product and then let the loop run without error checking.&lt;/blockquote&gt;

Hotspot as well does boundary check elimination:  http://weblogs.java.net/blog/kohsuke/archive/2008/03/deep_dive_into.html

When will the pie fight end?</description>
		<content:encoded><![CDATA[<blockquote><p>
In C#, every time a[i] and b[i] are evaluated, code executes to verify that the index i is within the legal range of index values for the two arrays. In C++ you could do some bounds checking before you compute your inner product and then let the loop run without error checking.</p></blockquote>
<p>Hotspot as well does boundary check elimination:  <a href="http://weblogs.java.net/blog/kohsuke/archive/2008/03/deep_dive_into.html" rel="nofollow">http://weblogs.java.net/blog/kohsuke/archive/2008/03/deep_dive_into.html</a></p>
<p>When will the pie fight end?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikhail</title>
		<link>http://www.johndcook.com/blog/2009/12/23/microsoft-solver-foundation/comment-page-1/#comment-29439</link>
		<dc:creator>Mikhail</dc:creator>
		<pubDate>Wed, 23 Dec 2009 16:13:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=3924#comment-29439</guid>
		<description>In some cases checking is eliminated, see this article: http://blogs.msdn.com/clrcodegeneration/archive/2009/08/13/array-bounds-check-elimination-in-the-clr.aspx</description>
		<content:encoded><![CDATA[<p>In some cases checking is eliminated, see this article: <a href="http://blogs.msdn.com/clrcodegeneration/archive/2009/08/13/array-bounds-check-elimination-in-the-clr.aspx" rel="nofollow">http://blogs.msdn.com/clrcodegeneration/archive/2009/08/13/array-bounds-check-elimination-in-the-clr.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.johndcook.com/blog/2009/12/23/microsoft-solver-foundation/comment-page-1/#comment-29437</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 23 Dec 2009 15:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=3924#comment-29437</guid>
		<description>Imagine something like a dot product:

&lt;code&gt;for (int i = 0; i &lt; n; i++) sum += a[i]*b[i]; &lt;/code&gt;

In C#, every time &lt;code&gt;a[i]&lt;/code&gt; and &lt;code&gt;b[i]&lt;/code&gt; are evaluated, code executes to verify that the index i is within the legal range of index values for the two arrays. In C++ you could do some bounds checking before you compute your inner product and then let the loop run without error checking.

I don&#039;t know the inner workings of the C# compiler. Maybe it&#039;s smart enough to optimize away some of this error checking.</description>
		<content:encoded><![CDATA[<p>Imagine something like a dot product:</p>
<p><code>for (int i = 0; i < n; i++) sum += a[i]*b[i]; </code></p>
<p>In C#, every time </code><code>a[i]</code> and <code>b[i]</code> are evaluated, code executes to verify that the index i is within the legal range of index values for the two arrays. In C++ you could do some bounds checking before you compute your inner product and then let the loop run without error checking.</p>
<p>I don't know the inner workings of the C# compiler. Maybe it's smart enough to optimize away some of this error checking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Lemire</title>
		<link>http://www.johndcook.com/blog/2009/12/23/microsoft-solver-foundation/comment-page-1/#comment-29435</link>
		<dc:creator>Daniel Lemire</dc:creator>
		<pubDate>Wed, 23 Dec 2009 15:25:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=3924#comment-29435</guid>
		<description>Why do you assume that C# is necessarily slower than C++?

Yes, Fortran and C (well written C) are faster than both C++ and Java (and C#)... but Java can very often match or even surpass C++.

I still write C++ because

(1) like it or not, garbage collection can be wasteful memory-wise, so for dealing with large in-memory data structures, you are better off in C++ than in Java;

(2) intensive I/O is can awkward in Java.


But for multiplying matrices? I would certainly not assume that C++ is better than Java (or C#).</description>
		<content:encoded><![CDATA[<p>Why do you assume that C# is necessarily slower than C++?</p>
<p>Yes, Fortran and C (well written C) are faster than both C++ and Java (and C#)&#8230; but Java can very often match or even surpass C++.</p>
<p>I still write C++ because</p>
<p>(1) like it or not, garbage collection can be wasteful memory-wise, so for dealing with large in-memory data structures, you are better off in C++ than in Java;</p>
<p>(2) intensive I/O is can awkward in Java.</p>
<p>But for multiplying matrices? I would certainly not assume that C++ is better than Java (or C#).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.314 seconds -->

