<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I see, thanks! <div class=""><br class=""><div class="">It's a relief, that huge overhead (as I wrongly perceived) really made me uncomfortable.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 2020-07-28, at 00:21, Oleg Grenrus <<a href="mailto:oleg.grenrus@iki.fi" class="">oleg.grenrus@iki.fi</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252" class="">
<div class=""><p class="">TL;DR bits, not bytes.<br class="">
<br class="">
It meant to say 320 bit.<br class="">
<br class="">
4 * 64 (Each Word32 is stored as Word64) + one 64bit header.<br class="">
<br class="">
5 * 64 = 320.<br class="">
<br class="">
It could be just 3 * 64 = 192.<br class="">
</p><p class="">- Oleg</p>
<div class="moz-cite-prefix">On 27.7.2020 9.58, YueCompl via
Haskell-Cafe wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:64E8B76F-DD77-4495-8920-F79D1664152C@icloud.com" class="">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252" class="">
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 class="">
<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>
</div>
_______________________________________________<br class="">Haskell-Cafe mailing list<br class="">To (un)subscribe, modify options or view archives go to:<br class=""><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br class="">Only members subscribed via the mailman list are allowed to post.</div></blockquote></div><br class=""></div></div></body></html>