So I did some tests and here are the results. I've tested this on a Dell LCD monitor using a JPAC wired to a LED. This Dell has 2 frames of latency. Because the recordings are captured at 120 fps I need to substract 4 video frames from the latency count in order to get the actual latency, and divide by 2. Be aware that I've done the counting very fast so I may have made some mistakes.
The game I tested is batsugun. This game responds on the second frame. It means that expected latency is 1 frame, by design.
The videos can be downloaded
https://drive.google.com/drive/folders/ ... sp=sharing
*groovymame 0.197 -d3d9ex - vsync ON - frame delay 8
8 9 7 7 9 9 10 8 9 8..............8.40->(8.40 - 4.00)/2 = 2.20
*shmupmame vsync OFF
7 9 9 8 8 9 9 8 8 9................8.40
10 7 6 8 12 7 6 6 7 7..............7.60
9 10 - 9 7 7 7 8 9 9 8..............8.30
average 8.10->(8.10 - 4.00)/2 = 2.05
*shmupmame vsync ON
12 11 10 11 14 12 12 13 11 13..............11.90->(11.90 - 4.00)/2 = 3.95
I took 3 videos for the Shmupmame vsync off case because the first result was so identical to GM that people would think I was cheating. As you can see, the results for Shmupmame are a bit erratic, this is expected because vsync off introduces artifacts in frame counting, depending on where the tearing is happening on the screen.
On average, Shmupmame with vsync OFF has just slightly less latency than GM, by a fraction of frame (0.15). This comes at the cost of terrible tearing.
GroovyMAME's latency, 2.20 frames, is exactly what's expected for frame delay 8 (input captured on time for 80% of frames). I can't raise frame delay any higher on this hardware for that particular game.
On the other hand, Shmupmame with vsync ON lags nearly 2 frames compared to GM. This is expected too. Those are the 2 frames that D3D9ex removes.
The conclusion is GroovyMAME and Shmupmame are almost equivalent in terms of latency, with a very slight advantage for Shmupmame, but GroovyMAME does this with proper vsync and unhacked emulation.
Now you have the information, use whatever suits you best.
EDIT: The most probable reason that GM crashed for you is having it configured for CRT so it was trying to switch resolutions. Just use "-monitor lcd" and it won't crash.