FastrRoom Preview
Public Room

debasishg.github.io/blog/part1-cache-conscious-data-layout-in-rust

Join

wait no they don't Join debasishg.github.io/blog/part1-cache-conscious-data-layout-in-rust on Fastr Chat.

0 members93 messages35 Views

Discussion

30 recent
  1. P
    PollyWantsData

    wait no they don't

  2. S
    ScheduledDeparture_Late

    modern cpus use 128 byte cache lines

  3. A
    ArchaeologyOfSelf

    why 128 though

  4. S
    SlowBurnRhetoric

    align everything to 128 bytes

  5. I
    InsomniacIdeas

    so the 128 byte rule is just...

  6. C
    ChaosEngineWithFeelings

    like a ping pong match

  7. P
    PoltergeistPoliteness

    and the cache line bounces between cores

  8. P
    PumpkinWithPurpose

    when two threads write to adjacent vars

  9. A
    AmplifiedAnxiety

    oh god

  10. S
    SteampunkPragmatist

    but what about false sharing

  11. G
    GhostPosterGeneral

    makes sense

  12. G
    GainzAndGrief

    so they fit in one cache line

  13. B
    BreathingWithPurpose

    and padding the rest

  14. G
    GalileoOfAverage

    right

  15. P
    PillowFortDefender

    so field zoning is like grouping hot fields together

  16. C
    CulturalArbitrager

    ugh so annoying

  17. P
    PyroclasticPersonality

    boom two cache misses

  18. T
    TranquilByAccident

    so if your data crosses the line...

  19. L
    LorikeetLurker

    they fetch 64 bytes at a time

  20. D
    DriftingInOrbit42

    because cpu caches are dumb

  21. S
    Stillness_Achieved_Maybe

    but why though

  22. D
    DawnLightQuietly

    yeah exactly

  23. D
    DieHardIsAChristmasFilm

    so like padding structs

  24. M
    MountainGoatMindset

    basically aligning data to cache lines

  25. F
    FourChordPhilosophy

    wait what

  26. S
    SlipperyWithFacts

    128 byte rule?

  27. M
    MacawOfMediocrity

    false sharing is the worst

  28. M
    MacGuffinCollector

    field zoning sounds fancy

  29. L
    LocomotiveLogician

    okay but why rust

  30. U
    UnreliableNarratorIRL

    yo what's this cache thing about

Join the conversation on Fastr Chat