captainys / TOWNSEMU

FM Towns Emulator "Tsugaru"
BSD 3-Clause "New" or "Revised" License
238 stars 17 forks source link

Optimize render of each color bits, and CPU Instruction. #56

Closed bcc2528 closed 1 year ago

bcc2528 commented 1 year ago

Remove conditional branchs of (true != transparent) from "for" in "for" in "for" loops in TownsRender::Render of each colors, and swich instructions compiled with jump table in i486DX::FetchOperand and i486DX::RunOneInstruction. jump table optimize is faster x1.3 then existing.

captainys commented 1 year ago

Wow! __assume(0) was what I have long been looking for! I looked for #pragma that does it, but never found it. I know it is effective, but never imagined it was going to make 1.3x difference. All tests passes. Thank you!