<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Migrating from uvector to vector</title>
	<atom:link href="http://donsbot.wordpress.com/2010/02/15/migrating-from-uvector-to-vector/feed/" rel="self" type="application/rss+xml" />
	<link>http://donsbot.wordpress.com/2010/02/15/migrating-from-uvector-to-vector/</link>
	<description>A Journal of Haskell Programming</description>
	<lastBuildDate>Mon, 03 Oct 2011 02:09:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: unsafePostComment</title>
		<link>http://donsbot.wordpress.com/2010/02/15/migrating-from-uvector-to-vector/#comment-300</link>
		<dc:creator><![CDATA[unsafePostComment]]></dc:creator>
		<pubDate>Wed, 17 Feb 2010 06:09:59 +0000</pubDate>
		<guid isPermaLink="false">http://donsbot.wordpress.com/?p=426#comment-300</guid>
		<description><![CDATA[I note that the Vector API uses lazy tuples where UVector has a strict pair type (:*:).  Has the benefit of strictness here been determined negligible, or was this a friendliness-of-API consideration?  Does the optimizer perhaps come to our rescue here?]]></description>
		<content:encoded><![CDATA[<p>I note that the Vector API uses lazy tuples where UVector has a strict pair type (:*:).  Has the benefit of strictness here been determined negligible, or was this a friendliness-of-API consideration?  Does the optimizer perhaps come to our rescue here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Doel</title>
		<link>http://donsbot.wordpress.com/2010/02/15/migrating-from-uvector-to-vector/#comment-297</link>
		<dc:creator><![CDATA[Dan Doel]]></dc:creator>
		<pubDate>Tue, 16 Feb 2010 09:15:23 +0000</pubDate>
		<guid isPermaLink="false">http://donsbot.wordpress.com/?p=426#comment-297</guid>
		<description><![CDATA[Some additional stuff:

Most regularly named vector functions have bounds checking, with an &#039;unsafeFoo&#039; version that doesn&#039;t do bounds checking. However, there are compile-time options that let you toggle bounds checking on and off, as well as toggling bounds checking for the unsafe versions. (It&#039;s too bad this can&#039;t be toggled at program compile time instead of library compile time.)

Mutable arrays are parameterized over the monad type, so they can be used in both ST and IO. The parameter given to the array is the state-thread type, so in IO, types look like:

MVector mv e =&gt; mv RealWorld e -&gt; IO whatever

while in ST they look like:

MVector mv e =&gt; mv s e -&gt; ST s whatever

You can also be parametric in the monad, like so:

(PrimMonad m, MVector mv e) =&gt; mv (PrimState m) e -&gt; m whatever

However, there seem to be some flukes in the 6.12 GHC optimizer with regard to using this with IO. Intermediate code generation (and thus performance) for ST seems much better, so it&#039;s probably advisable to stick to it as much as possible, currently.]]></description>
		<content:encoded><![CDATA[<p>Some additional stuff:</p>
<p>Most regularly named vector functions have bounds checking, with an &#8216;unsafeFoo&#8217; version that doesn&#8217;t do bounds checking. However, there are compile-time options that let you toggle bounds checking on and off, as well as toggling bounds checking for the unsafe versions. (It&#8217;s too bad this can&#8217;t be toggled at program compile time instead of library compile time.)</p>
<p>Mutable arrays are parameterized over the monad type, so they can be used in both ST and IO. The parameter given to the array is the state-thread type, so in IO, types look like:</p>
<p>MVector mv e =&gt; mv RealWorld e -&gt; IO whatever</p>
<p>while in ST they look like:</p>
<p>MVector mv e =&gt; mv s e -&gt; ST s whatever</p>
<p>You can also be parametric in the monad, like so:</p>
<p>(PrimMonad m, MVector mv e) =&gt; mv (PrimState m) e -&gt; m whatever</p>
<p>However, there seem to be some flukes in the 6.12 GHC optimizer with regard to using this with IO. Intermediate code generation (and thus performance) for ST seems much better, so it&#8217;s probably advisable to stick to it as much as possible, currently.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
