• bamboo@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    Bad memory management can actually slow down applications significantly. Allocating memory is actually a fairly expensive operation. So much that high performance software actually uses a bunch of tricks to avoid extra allocations where possible. Additionally, accessing memory is actually kinda slow for a CPU, and the CPU often has to sit around for many clock cycles waiting for memory to be retrieved if it’s not in the CPU’s cache. If your main data can be stored more compactly, more of that data can fit in your CPU’s cache, reducing that idle time.