4 ms·
Can anyone provide an example use case for this? Especially those different curves.
by makeworld 4y ago
Can anyone provide an example use case for this? Especially those different curves.
- zamadatix 4y agoThe different curves do a good job of preserving locality when mapping to 2d space.
- anitil 4y agoI can think of two where this tool could be a first step - 1. Do you ever have a program that kind of just sucks? A bit slower than you expect, laggy but not in any specific way? The fundamental cause could be many things, but it could be, for example, thrashing memory pointlessly. I've seen processes memset/bzero then write, then memset/bzero for seemingly no reason and the source is difficult to follow. 2. How does struct alignment and malloc alignment impact your program? Maybe you could reduce your working set by using packed structs or changing the order of elements. Maybe you could choose a different allocator. But this tool could show you if you've got a bunch of loose space floating around
- jart 4y agoThis is good information. On one of my other blog posts, I talk about what different types of memory look like under this viewer. https://justine.lol/sizetricks/#look https://justine.lol/sizetricks/#look It should give you the basic idea of how to interpret what you see under this intuitive display. It also goes more in depth into how size optimization tricks like struct alignment can be done.
- anitil 4y agoAh thanks for that I remember that page now, time for a reread!