I have a complaint about main.cpp. Specifically, it has a lot of unnecessary code repetition in the switch statements that can easily be abstracted away (and likely even sped up!) if you know what you're doing.
For branchless programming, this is definitely a case where it could earn a non-negligible boost in time performance. Maybe it could be done with function array lookups?
I have a complaint about
main.cpp. Specifically, it has a lot of unnecessary code repetition in the switch statements that can easily be abstracted away (and likely even sped up!) if you know what you're doing.For branchless programming, this is definitely a case where it could earn a non-negligible boost in time performance. Maybe it could be done with function array lookups?