<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>TL;DR bits, not bytes.<br>
<br>
It meant to say 320 bit.<br>
<br>
4 * 64 (Each Word32 is stored as Word64) + one 64bit header.<br>
<br>
5 * 64 = 320.<br>
<br>
It could be just 3 * 64 = 192.<br>
</p>
<p>- Oleg</p>
<div class="moz-cite-prefix">On 27.7.2020 9.58, YueCompl via
Haskell-Cafe wrote:<br>
</div>
<blockquote type="cite"
cite="mid:64E8B76F-DD77-4495-8920-F79D1664152C@icloud.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Hello Cafe,
<div class=""><br class="">
</div>
<div class="">I'm about to introduce UUID into my code, and see <a
href="https://github.com/haskell-hvr/uuid/issues/24" class=""
moz-do-not-send="true">https://github.com/haskell-hvr/uuid/issues/24</a> stating:</div>
<div class=""><br class="">
</div>
<div class="">> <span style="color: rgb(206, 202, 195);
font-family: -apple-system, system-ui, "Segoe UI",
Helvetica, Arial, sans-serif, "Apple Color Emoji",
"Segoe UI Emoji"; font-size: 14px; orphans: 2;
widows: 2; background-color: rgb(24, 26, 27);" class="">Currently,</span><span
style="color: rgb(206, 202, 195); font-family: -apple-system,
system-ui, "Segoe UI", Helvetica, Arial, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji";
font-size: 14px; orphans: 2; widows: 2; background-color:
rgb(24, 26, 27);" class=""> </span><code style="color:
rgb(206, 202, 195); orphans: 2; widows: 2; box-sizing:
border-box; font-family: SFMono-Regular, Consolas,
"Liberation Mono", Menlo, monospace; font-size:
11.9px; padding: 0.2em 0.4em; margin: 0px;
border-top-left-radius: 6px; border-top-right-radius: 6px;
border-bottom-right-radius: 6px; border-bottom-left-radius:
6px; background-color: rgba(220, 224, 228, 0.0980392)
!important;" class="">UUID</code><span style="color: rgb(206,
202, 195); font-family: -apple-system, system-ui, "Segoe
UI", Helvetica, Arial, sans-serif, "Apple Color
Emoji", "Segoe UI Emoji"; font-size: 14px;
orphans: 2; widows: 2; background-color: rgb(24, 26, 27);"
class=""> </span><span style="color: rgb(206, 202, 195);
font-family: -apple-system, system-ui, "Segoe UI",
Helvetica, Arial, sans-serif, "Apple Color Emoji",
"Segoe UI Emoji"; font-size: 14px; orphans: 2;
widows: 2; background-color: rgb(24, 26, 27);" class="">is
represented as</span></div>
<div class="highlight highlight-source-haskell" style="box-sizing:
border-box; margin-bottom: 16px; background-color: rgb(24, 26,
27); color: rgb(206, 202, 195); font-family: -apple-system,
system-ui, "Segoe UI", Helvetica, Arial, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji";
font-size: 14px; font-variant-ligatures: normal; orphans: 2;
widows: 2; overflow: visible !important;">
<pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.9px; margin-top: 0px; margin-bottom: 0px; overflow-wrap: normal; padding: 16px; overflow: auto; line-height: 1.45; background-color: rgb(28, 30, 31); border-radius: 6px; word-break: normal;" class=""><span class="pl-k" style="box-sizing: border-box; color: rgb(218, 75, 88);">data</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(125, 84, 199);">UUID</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(218, 75, 88);">=</span> <span class="pl-ent" style="box-sizing: border-box; color: rgb(121, 221, 145);">UUID</span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(159, 151, 138);"><span class="pl-c" style="box-sizing: border-box;">{-</span># UNPACK #<span class="pl-c" style="box-sizing: border-box;">-}</span></span> !<span class="pl-ent" style="box-sizing: border-box; color: rgb(121, 221, 145);">Word32</span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(159, 151, 138);"><span class="pl-c" style="box-sizing: border-box;">{-</span># UNPACK #<span class="pl-c" style="box-sizing: border-box;">-}</span></span> !<span class="pl-ent" style="box-sizing: border-box; color: rgb(121, 221, 145);">Word32</span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(159, 151, 138);"><span class="pl-c" style="box-sizing: border-box;">{-</span># UNPACK #<span class="pl-c" style="box-sizing: border-box;">-}</span></span> !<span class="pl-ent" style="box-sizing: border-box; color: rgb(121, 221, 145);">Word32</span>
<span class="pl-c" style="box-sizing: border-box; color: rgb(159, 151, 138);"><span class="pl-c" style="box-sizing: border-box;">{-</span># UNPACK #<span class="pl-c" style="box-sizing: border-box;">-}</span></span> !<span class="pl-ent" style="box-sizing: border-box; color: rgb(121, 221, 145);">Word32</span></pre>
</div>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom:
16px; color: rgb(206, 202, 195); font-family: -apple-system,
system-ui, "Segoe UI", Helvetica, Arial, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji";
font-size: 14px; font-variant-ligatures: normal; orphans: 2;
widows: 2; background-color: rgb(24, 26, 27);" class="">>
However, this suboptimal for 64bit archs (where GHC currently
stores this a 320-byte Heap object); ...</p>
<div class=""><br class="">
</div>
<div class="">According to <a
href="https://wiki.haskell.org/GHC/Memory_Footprint" class=""
moz-do-not-send="true">https://wiki.haskell.org/GHC/Memory_Footprint</a> I
can understand each evaluated `Word32` on 64-bit hardware can
take 2 words - 16 bytes, and given they are unpacked and strict,
I think one whole UUID record should just take 64 bytes plus a
few words, which is far less than 320 bytes. So how comes the
320 bytes?</div>
<div class=""><br class="">
</div>
<div class="">Thanks with regards,</div>
<div class="">Compl</div>
<div class=""><br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
</blockquote>
</body>
</html>