3 ms·
Their should be no optimizations which rely on a-priori knowledge of the dataset. I.e. if you calculate a perfect hash function at runtime by inspecting the dat
by gunnarmorling 3y ago
Their should be no optimizations which rely on a-priori knowledge of the dataset. I.e. if you calculate a perfect hash function at runtime by inspecting the dataset, that's fine (not sure whether it's beneficial), but hard coding it, is not.
- johndough 3y agoThat is a tricky rule to enforce. For example, some solutions assume that the temperature values fit into an int, which could be interpreted as relying on a priori knowledge.
- Hugsun 3y agoThat's true. Some assumptions always have to be made. In this case, we can assume place names that can be arbitrary strings and temperatures that occur naturally on earth. Optimizing around those constraints should be fine. We could probably limit the string length to something like 100 characters or so. Bad assumptions would for example be to assume that all possible place names are found within the example data.
- sfn42 3y agoSomehow I doubt any weather station would register temperatures above 2,14 billion degrees