Hacker GitHub

← All repos

emilk/ram_bench

View on GitHub ↗ ★ 129 C++

A benchmark for random memory accesses

5 mentions on Hacker News by 5 people: 0 stories, 5 comments · first 2018-12-21 · latest 2023-11-20

Mentions per year 5 mentions · busiest year 2022 (2)
20082026
  1. Code is here: https://github.com/emilk/ram_bench/blob/master/list_traversa... The author makes 2 allocations: Node* memory = (Node*)malloc(N * sizeof(Node)); Node** nodes = (Node**)malloc(N * sizeof(Node*)); Of those, only the first one…
    comment by gizmo686 · 2023-11-20 · in The Myth of RAM (2014)
  2. …permutation arrays, and so on). > Edit: I misremembered, memory access is actually O(sqrt(N)): https://github.com/emilk/ram_bench It's not that either. The author ran out of memory; They ran a program that needs 10GB of ram on a machine…
  3. …constant factors matter at that point. Edit: I misremembered, memory access is actually O(sqrt(N)): https://github.com/emilk/ram_bench
  4. There is the idea that you should treat memory access as an O(N^.5) operation: https://github.com/emilk/ram_bench I am not sure if any serious academic work has been built on this model, but it's a nice short hand.
  5. …data structures the total size tells you the speed. Here's a test to see how your CPU does: https://github.com/emilk/ram_bench