Bridging the gap between algorithmic and learned index structures