You can of course combine both :) 

The question is: is it worth to create a worse API and how much speedup do you get :P 

The speedup according to http://jsperf.com/id-vs-class-vs-tag-selectors/2 is that comparing to id lookup 
* class is 57% slower
* attribute is lookup is 98% slower

So I'd say that because both are in the same exponential area (0 < x < 100) the speedup that you get is not worth to create a worse api.