Why don't web browsers do this?
In the 80's, computers started instantly. They were READY to go when they first turned on.
Over the next few decades, people wanted to do more things and operating systems got slower to initialize. To solve this, OS and hardware manufacturers created hibernate and standby modes.
Now, many people have stopped using native applications and moved to the web. When I load facebook or gmail, it takes dozens of seconds to start up, and minutes over a slower connection. During this time,
- The source files for the application are loaded from the server,
- The source code is compiled and run.
- Requests are made to retrieve the application state from the server, and
- the DOM is manipulated to present the state to the user.
Or, without any co-operation from standards, browsers can do this RIGHT NOW and snapshot commonly used pages instead of discarding them when users close a tab. When the url is re-entered, from the application perspective it is just as if the machine went into standby and then resumed. The browser could take cookie expiration into account, or to be totally safe, web pages could opt in with a meta tag.
Throw away the keys: Easy, Minimal Perfect HashingPerfect hashing is a technique for building a hash table with no collisions in the minimum possible space. They are a easy to build with this simple python function.
VP trees: A data structure for finding stuff fastLet's say you have millions of pictures of faces tagged with names. Given a new photo, how do you find the name of person that the photo most resembles?
In the cases I mentioned, each record has hundreds or thousands of elements: the pixels in a photo, or patterns in a sound snippet, or web usage data. These records can be regarded as points in high dimensional space. When you look at a points in space, they tend to form clusters, and you can infer a lot by looking at ones nearby.