Fast CPU Points Generation Library

22 replies 120 views
Posts: 1362 · Reputation: 35
#21May 3, 2021, 10:29 PM
No algorithm gives O(1) lookup for non-linear keys. A B-Tree can help speed things up, but you’ll still have log(n) performance.
3 Reply Quote Share
Posts: 1362 · Reputation: 35
#22May 6, 2021, 10:13 AM
Let’s say I have 60GB RAM and computed 2^30 points will lookups be O(1)? I have an algorithm that solves some puzzles faster, but I need instant lookups.
4 Reply Quote Share
Posts: 1362 · Reputation: 35
#23May 6, 2021, 09:04 PM
Nope, it won't be instant. You need a dictionary structure for lookups. With 2^30 keys, direct O(1) access needs way more space than you have.
3 Reply Quote Share

Related topics