As others have said, some games had hardware that takes a lot of CPU to emulate. Most are due to powerful processors on the original arcade boards, definitely including the NBA game you mentioned. Old games (like asteroids) had discreet circuits that take a lot of CPU to emulate; mame now emulates these circuits for asteroids instead of using sound samples.
OTOH, depending on the settings, the video card can be a choke point. How much depends on how well the video card does resolution and directX (direct3D or directDraw), and if you're using the overlays, video effects, or stretching. Asteroids, a vector game, runs at a fairly high res and has overlays IIRC, so the video card could be adding to its slow down. Add that old onboard video chips used CPU and main memory, that's "speed" stolen from mame.
So, while adding the video will most likely help, it won't help enough for the NBA game, and might help asteroids. (I have ati 9650 card.)