> Which is faster in MAME, D3D or Opengl?
Like anything in emulation, it depends on the graphics hardware and/or drivers. Some machines may excel at one, or the other. It can only be determined by testing yourself. For Windows, d3d, opengl and bgfx are all valid options.
mame pacman -nothrottle -str 30 -video d3d
mame pacman -nothrottle -str 30 -video opengl
mame pacman -nothrottle -str 30 -video bgfx
Just note the higher percentage means the faster against normal speed a machine is running. From there, you can make your own conclusions.