vgmrips / vgmplay-legacy

VGM file command-line player and Winamp plugin.
http://vgmrips.net
221 stars 52 forks source link

Nuked OPM 0.9 beta #77

Closed nukeykt closed 3 years ago

superctr commented 3 years ago

Looks good to me. Just a small thing, I would prefer if the % were changed to & for speed reasons.

nukeykt commented 3 years ago

I think compiler will optimize it to & 31 (even in debug build) because I use unsigned integer. But I don't mind this change.

nukeykt commented 3 years ago

yeah, at very least visual studio optimizes it to & in all builds

superctr commented 3 years ago

We still build with Visual C++ 6 from 1998. It doesn't do all the optimizations that modern compilers do, so I think it's good to include it in the code.

ValleyBell commented 3 years ago

Looks good to me.

btw: For uint % 32, MSVC6 uses mov ecx,20h / div eax,ecx in Debug mode and and ecx,1Fh in Release mode.

nukeykt commented 3 years ago

Interesting, dos era version of watcom compiler did this optimization in debug mode, so I assumed other compilers would do this as well

ValleyBell commented 3 years ago

Debug mode really is not something I would optimize for, though. As long as it performs well in Release mode, that's fine to me.