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
20082026
-
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) -
…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…
comment by geocar · 2022-12-02 · in Blitsort: A fast, in-place stable hybrid merge/quick sort -
…constant factors matter at that point. Edit: I misremembered, memory access is actually O(sqrt(N)): https://github.com/emilk/ram_bench
comment by naasking · 2022-12-02 · in Blitsort: A fast, in-place stable hybrid merge/quick sort -
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.
comment by Certhas · 2020-06-09 · in Faster than radix sort: Kirkpatrick-Reisch sorting -
…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
comment by herf · 2018-12-21 · in How can dereferencing the first character take longer when the string is longer?