<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="">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="">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="">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></body></html>