The best thing ever for MAME on Windows, was GroovyMAME's system, allowing you to define whether you want it to sync to your monitor's refresh to garantee smooth scrolling, or if the game is too far-off 60Hz to use an alternative triple-buffering implementation also queuing less. A trigger limit in Hz offset could be determined to select automatically between the two solutions. This also allowed to use D3D9ex which works with less queued frames on every friggin Windows from Vista to 10, and until now produced the lowest lag figures measured. All-in-all far superior to what the current MAME offers. (Also, 'frame_delay' and 'vsync_offset' options were available to tune manually and reach even better lag performance depending on the emulated hardware and your computer's performance)
No news from GroovyMAME's author since he joined the MAME team though, last version was 0.171, and no development news of a similarly efficient system in baseline MAME yet...