I'm writing a selector engine at the moment(badly I hasten to add). That's v interesting. I've got a pretty basic after thought of a cache implentation which just caches the results and the selector. I had been wondering whether it was feasible to cache in parts as the search is being processed, but just making good use of the root solves that.
If someDiv is going to be used again, then the second option is a lot better. It saves jQuery from ever having to find #someDiv again, and it makes the process of finding things inside someDiv faster.
Also interesting ( for me anyway) to see what's returned from $('selector'). A test on a simple list.
I'm starting to see the advantages of returning an array like object.
var x = $('ul');
var y = $('li', x);
context : Document
lenght : 7
prevObject : [ ul ]
selector : 'ul li'
A quick experiment, which returns a custom array like object.
var y = new test('li');