PS: Even just limiting sorting to the top 1000 overall stories and top 1000 new stories could be a major speed bump.
I see your point about speed, but I think that there are a bunch of shortcuts you can take (like your top 1k idea) that mitigate the issue, and if it is a feature you can switch off if you'd prefer to just go fast with the hard-coded, then ...