If the internal vectors are fixed size, you can easily write a wrapper around Vector Int that converts (Int,Int) indices into indices in the sub-vector.<br><br>If the internal vectors have dynamic size, you can&#39;t declare an Unbox instance, because pointers can&#39;t be unboxed; unboxed types are opaque to the garbage collector.<br>
<br>At a low level, Vector Int is<br><br>  Vector Word# Word# ByteArray#<br><br>where Word# are machine words and ByteArray# is like &#39;const char *&#39; that is understood by the ghc garbage collector.<br><br><div class="gmail_quote">
On Wed, Nov 9, 2011 at 1:56 AM, kaffeepause73 <span dir="ltr">&lt;<a href="mailto:kaffeepause73@yahoo.de">kaffeepause73@yahoo.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
quick question about unboxed Vectors :<br>
<br>
Is it possible to create an unboxed vector of unboxed vector ? :<br>
<br>
&gt; import qualified Data.Vector.Unboxed as V<br>
&gt; type UnboxedNestedVextor =  V.Vector (V.Vector Int)<br>
<br>
Alternatively I would have to use:<br>
<br>
&gt; import qualified Data.Vector.Unboxed as V<br>
&gt; import qualified Data.Vector as VB<br>
<br>
type UnboxedNestedVextor =  VB.Vector (V.Vector Int)<br>
<br>
Is there a rule of thumb how much quicker Unboxed Vectors are ?<br>
<br>
Cheers Phil<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://haskell.1045720.n5.nabble.com/Data-Vector-Unboxed-tp4977289p4977289.html" target="_blank">http://haskell.1045720.n5.nabble.com/Data-Vector-Unboxed-tp4977289p4977289.html</a><br>

Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</font></blockquote></div><br>